我'我试图使用jQuery加载Protovis脚本。在' index.php'文件加载如下所示:
$(document).ready(function(){
$("#main").load("price.php");
var refresh = setInterval(function() {
$("#main").load("price.php");
}, 1000);
});
<div id='main'></div>
&#39; price.php&#39;包含基本的expamle形式Protovis页面: http://mbostock.github.io/protovis/ex/area.html
当我基本打开&#39; price.php&#39;文件,没有错误,只有图表。 但是当我打开'index.php&#39;提交错误信息:
VM12842:8 Uncaught SyntaxError: Unexpected identifier <line 8>
第8行是:
x = pv.Scale.linear(data, function(d) d.x).range(0, w),
我不知道它可能是什么类型的错误,我认为jQuery阻止某些东西,但是什么?
对我来说加载这样的文件非常重要,因为我会将数据下载到图表数据库
感谢帮助