我是新来的编码...只是想知道我在这个
<script type="text/javascript">
// This example loads the "Canadian Parliament 2012"
// dataset from a CSV instead of from JSON. // System.import('app').catch(function (err) { console.error(err); });
$(function() {
Dimensions = "sector_type";
Measures = "";
tblname = "sample";
$.ajax({
method: "GET",
url: "http://localhost:5000/api/values/5"
headers: {
'Content-Type': 'application/json'
},
traditional: true,
async: false,
}).success(function results(data) {
chartdata = data.data;
alert("SUCCESS");
});
});
</script>
这是给我的未捕获的参考做错了:$不是defined.Also这是写一个小脚本从本地主机检索数据的正确方法:5000和我应该怎么做来显示数据 任何帮助深表感谢
是否包含jQuery脚本? – guradio
检查jquery插件是否引用到您的页面 – Bharat
您的var $未定义。您需要包含用于定义$ var的查询脚本。 –