我在做什麼錯?下列不upate我的JSON對象:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
function getJson() {
$.getJSON("http://laptop/EstimatorWeb/GetConfig.ashx", function (da) {
json = da;
//document.getElementById("resDiv").innerText=da;
}).success(function() {
alert("second success");
}).error(function() {
alert("error");
});
我可以看到我的Web服務返回的提琴手JSON對象。這只是最後一塊不更新對象。我沒有收到任何成功或錯誤的警報。
將'http:// laptop/EstimatorWeb/GetConfig.ashx'更改爲有效的網址 –
@TamilSelvan:您是否試圖關注該網址? –
'http:// laptop/EstimatorWeb ...'看起來不像一個有效的URL。 –