使用javascript方式调用open-flash-chart,data-file如果是url网页路径传递多个参数,需要使用escape()方法。
默认open-flash-chart会把“&”解析成 %26
example:
swfobject.embedSWF("swf/open-flash-chart.swf", "divid", "100%", "350", "9.0.0", "expressInstall.swf", { "data-file": escape("${base}/ad/getReportForms.action?flashChart=2&tag=${tag}&userId=${userId}&adId=${adId}&dateType=${dateType}&startTime=${startTime}&endTime=${endTime}&selectTime=${selectTime}")});
本文介绍如何通过JavaScript调用Open Flash Chart组件,并重点讲解了在传递包含多个参数的URL时,如何正确使用escape()方法来确保参数能够被正确解析。
320

被折叠的 条评论
为什么被折叠?



