Skip to content

Instantly share code, notes, and snippets.

@LeezQ
Created September 11, 2013 07:22
Show Gist options
  • Save LeezQ/6520300 to your computer and use it in GitHub Desktop.
Save LeezQ/6520300 to your computer and use it in GitHub Desktop.
js 常用
$.ajax({
url: '/twitter/newtwitter',
type: "POST",
timeout: 60000,
data: data,
dataType: 'json',
success: function(json){
if (json == null) {
alert(MGLANG.msgTimeout);
} else {
var code = json.status.code;
var msg = json.status.msg;
if(code == 1001) {
}
}
},
error:function (XMLHttpRequest, textStatus, errorThrown) {
if ("timeout" == textStatus) {
alert(MGLANG.msgTimeout);
}
},
complete:function(XHR, TS) {
}
});
@thisisbaozi
Copy link

。。。。。。。。What is this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment