1$.ajax({ url: "/path/to/file", type: "default GET (Other values: POST)", dataType: 'default: Intelligent Guess (Other values: xml, json, script, or html)', data: { param1: 'value1' }, success: function() { console.log("success"); }, error: function() { console.log("error"); }});2$.ajax({ url: '/path/to/file', type: 'default GET (Other values: POST)', dataType: 'default: Intelligent Guess (Other values: xml, json, script, or html)', data: {param1: 'value1'},}).done(function() { console.log("success");}).fail(function() { console.log("error");}).always(function() { console.log("complete");});
添加回答
举报
0/150
提交
取消