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

Copy codeThe code is as follows:
type: “GET”,
url: desturl,
success:function(data) {
if(data!=”) {
// addTableListener(document.getElementById(“tbColor”),0,0);
error: function(){
Alert (“asynchronous query error”);


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 error. If you use the getjson function, you cannot handle this error

Recommended Today

MySQL related

Indexes Bottom structure Disadvantages of hash table index: Using hash storage requires adding all files to memory, which consumes more memory space If all queries are equivalent queries, the hash is indeed fast, but in the actual scene, more data is found, and not all queries are equivalent queries, so the hash table is not […]