Tag:Underlying function

  • Which is a better underlying function than getjson? What are the advantages


    Copy codeThe code is as follows: $.ajax({ type: “GET”, url: desturl, success:function(data) { if(data!=”) { linfo.innerHTML=data; } loadimg.style.display=”none”; // addTableListener(document.getElementById(“tbColor”),0,0); }, error: function(){ Alert (“asynchronous query error”);loadimg.style.display=”none”; },dataType:”json” }); The advantage is that if there is a problem with the network, the error method can be used to tell the user that there is an […]