Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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ÕýÔò±í´ïʽ(ת)

Ò»£¬¸ÅÊö
1£¬ÕýÔò±í´ïʽ£¬¿ÉÒÔ˵ÊÇÈκÎÒ»ÖÖ±à³ÌÓïÑÔ¶¼ÌṩµÄ»úÖÆ£¬ËüÖ÷ÒªÊÇÌṩÁ˶Ô×Ö·û´®µÄ´¦ÀíÄÜÁ¦¡£
2£¬ÕýÔò±í´ïʽÔÚÒ³Ãæ´¦ÀíÖеÄʹÓó¡¾°£º
1£©±íµ¥ÑéÖ¤¡£Ñé֤ijЩÓò·ûºÏijÖÖ¹æÔò£¬ÀýÈçÓʼþÊäÈë¿ò±ØÐëÊäÈëµÄÊÇÓʼþ¡¢ÁªÏµµç»°ÊäÈë¿òÊäÈëµÄ±ØÐëÊÇÊý×ֵȵÈ
2£©´¦ÀíDOMÄ£ÐÍ¡£ÀýÈçͨ¹ý±í´ïʽ¶¨Î»DOMÖеÄÒ»¸ö¶ÔÏó»òһϵÁ ......

javascriptÐÔÄÜÓÅ»¯

ºÜ¾Ã¾ÍÏë×ܽáһϹØÓÚjavascriptÐÔÄÜÓÅ»¯·½ÃæµÄһЩ¶«Î÷£¬Æ½Ê±Ò²ÓÐ×¢ÒâÊÕ¼¯Õâ·½ÃæµÄ×ÊÁÏ¡£°Ñdel.icio.usÀïµÄÊղصĶ«Î÷·­³öÀ´¿´Ò»±é£¬²Å¾ªÆæµØ·¢ÏÖ£¬ÕâЩËùνµÄÓÅ»¯·½·¨´ó¶à³ö×Ô¡¶javascript¸ß¼¶³ÌÐòÉè¼Æ¡·Ò»Ê飬µ±È»Ò²Óиö±ð
²»Ò»ÑùµÄ¡£×ÜÖ®Õâ±¾ÊéÉϹØÓÚjavascriptÐÔÄÜÓÅ»¯µÄÄÚÈÝ×ã×ãÓÃÁ˽ü20Ò³À´½øÐвûÊö£¬ËùÒÔ½ñÌìÎÒÒ²Õ ......

IEºÍFirefoxÔÚJavaScriptÓ¦ÓÃÖеļæÈÝÐÔ

1.document.formName.item("itemName") ÎÊÌâ
˵ Ã÷:IEÏÂ,¿ÉÒÔʹÓÃdocument.formName.item("itemName")»òdocument.formName.elements ["elementName"];FirefoxÏÂ,Ö»ÄÜʹÓÃdocument.formName.elements["elementName"].
½â¾ö·½·¨:ͳһʹÓÃdocument.formName.elements["elementName"].
2.¼¯ºÏÀà¶ÔÏóÎÊÌâ
˵Ã÷:IEÏÂ,¿ÉÒÔ ......

ËøÆÁJavaScriptƬ¶Î

var docEle = function() {
return document.getElementById(arguments[0]) || false;
}
function cloDiv(){
var overlayID="overlay";
var msgID = "overlayMsg";
document.body.removeChild(docEle(overlayID));
document.body.removeChild(docEle(msgID));
}
function openNewDiv() {
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ