FusionChart µÄjavascript Ó÷¨
FusionChart ¾Í²»ÓýéÉÜÁË°Ñ£¬Ò»¿îÖ§³Ö¶àÖÖÓïÑÔµÄͼ±íÉú³É¿Ø¼þ£¬Éú³ÉµÄͼ±í·á¸»£¬ÃÀ¹Û£¬ÇÒÓж¯Ì¬¸Ð£¬ÒòΪËüÉú´æµÄ¶«Î÷¾ÍÊÇÒ»¸öflash¡£Ò»Ï½éÉÜÒ»ÏÂËüµÄjavascript ʵÏÖ·½Ê½°Ñ¡£
·Ï»°ÉÙ˵£¬Ö±½ÓÉÏʵÀý
<HTML>¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡ <HEAD>¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡ <SCRIPT LANGUAGE="Javascript" SRC="js/FusionCharts.js"></SCRIPT>¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡ <SCRIPT LANGUAGE="JavaScript">¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //Êý¾Ý¡¡¡¡
var strXML = "<graph caption='Hours worked' showNames='1'> <set name='Tom' value='32' color='AFD8F8'/><set name='Mary' value='16' color='F6BD0F'/><set name='Jane' value='42' color='8BBA00'/></graph>";¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ /**//*¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ * µ±Óû§µ¥»÷°´Å¥Ê±µ÷ÓÃÕâ¸ö·½·¨¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡ * Õâ¸ö·½·¨ÓÃÀ´Ê¹ÓÃеÄSWFÎļþ´´½¨Ò»¸öеÄFusionChartsʵÀý¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ */¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ function updateChart(chartSWF){¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //Create another instance of the chart.¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ var chart1 = new FusionCharts(chartSWF, "chart1Id", "400", "300", "0", "0");¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ chart1.setDataXML(strXML);¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ chart1.render("chart1div");¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ }¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡ </SCRIPT>¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡ </HEAD>¡¡¡¡¡¡¡¡¡¡¡¡
<BODY>¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡ <div id="chart1div">¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡ FusionCharts¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡ </div>¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡ <script language="JavaScript">¡¡
¡¡¡¡
¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡ var chart1 = new FusionCharts("functionchart/Column3D.swf", "chart1Id", "400", "300", "0", "0");¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡ chart1.setDataXML(strXML);¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡ chart1.render("chart1div");¡¡¡¡
¡¡¡¡¡¡¡¡¡¡
¡¡¡¡ </script>¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡ <
Ïà¹ØÎĵµ£º
ºÜ¾Ã¾ÍÏë×ܽáһϹØÓÚjavascriptÐÔÄÜÓÅ»¯·½ÃæµÄһЩ¶«Î÷£¬Æ½Ê±Ò²ÓÐ×¢ÒâÊÕ¼¯Õâ·½ÃæµÄ×ÊÁÏ¡£°Ñdel.icio.usÀïµÄÊղصĶ«Î÷·³öÀ´¿´Ò»±é£¬²Å¾ªÆæµØ·¢ÏÖ£¬ÕâЩËùνµÄÓÅ»¯·½·¨´ó¶à³ö×Ô¡¶javascript¸ß¼¶³ÌÐòÉè¼Æ¡·Ò»Ê飬µ±È»Ò²Óиö±ð
²»Ò»ÑùµÄ¡£×ÜÖ®Õâ±¾ÊéÉϹØÓÚjavascriptÐÔÄÜÓÅ»¯µÄÄÚÈÝ×ã×ãÓÃÁ˽ü20Ò³À´½øÐвûÊö£¬ËùÒÔ½ñÌìÎÒÒ²Õ ......
1.Text µ¥Ðе¥ÁÐÊäÈëÔªËØ
¹¦ÄÜ£º¶ÔText±êʶÖеÄÔªËØʵʩÓÐЧµÄ¿ØÖÆ
»ù±¾ÊôÐÔ£º
Name£ºÉ趨Ìá½»ÐÅÏ ......
1. ±ê×¼µÄ·½·¨
<mce:script type="text/javascript"><!--
function openWin(src, width, height, showScroll){
window.showModalDialog (src,"","location:No;status:No;help:No;dialogWidth:"+width+";dialogHeight:"+height+";scroll:"+showScroll+";");
}
// --></mce:script> &n ......
keycode 0 =
keycode 1 =
keycode 2 =
keycode 3 =
keycode 4 =
keycode 5 =
keycode 6 =
keycode 7 =
keycode&nb ......
parseFloat ת»»³É¸¡µãÊý
parseInt ת»»³ÉÕûÊý.
ÕâÁ½¸öº¯Êý¶¼ÓÐЩÈÝ´íÐÔµÄ,±ÈÈç"123abc"»á±ä³É123.
Èç¹ûÂ¥Ö÷Ï£Íû¸ü׼ȷһЩ,Æäʵ¿ÉÒÔÅжÏÒ»ÏÂ,È»ºóÓÃeval,ÏñÕâÑù
²»¹ýÒ²¿ÉÒÔʹÓÃÕâÑùµÄ·½·¨:
var a = "234" ;
a = a.replace(/(^[\\s]*)|([\\s]*$)/g, "");
if( a !="" && !isNaN( a ) )
{//Èç¹ûÊÇÊý×Ö
a = e ......