使用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,并在data-file参数中传递包含多个复杂参数的URL路径。重点在于使用escape()方法解决URL中特殊字符解析问题,确保数据正确传递。
321

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



