LeezQ
9/11/2013 - 7:22 AM

js 常用

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