我是新來的編碼...只是想知道我在這個
<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的查詢腳本。 –