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) {
}
});