jquery异步跨域访问代码

2019-12-24,,,,

复制代码 代码如下:
/*
    $.ajax({
        url : url,
        type : 'POST',
        data : {
            CorpID : CorpID,
            Pwd : Pwd,
            Mobile : Mobile,
            Content : Content,
            Cell : '',
            SendTime : ''
        },
        async : true,//异步
        dataType : 'text',//'text','jsonp'
        success : function(data, textStatus) {
            //alert(data);
            if (data == 0) {
                alert("短信已发送成功,请注意查收!");
            } else if (data == -1) {
                alert("账号未注册!");
            } else if (data == -2) {
                alert("服务端报错信息:其他错误.");
            } else if (data == -3) {
                alert("帐号或密码错误!");
            } else if (data == -4) {
                alert("手机号码格式不正确!");
            } else if (data == -5) {
                alert("余额不足,请先充值!");
            } else if (data == -6) {
                alert("定时发送时间不是有效的时间格式!");
            } else if (data == -7) {
                alert("禁止10小时以内向同一手机号发送相同短信!");
            } else if (data != null) {
                alert("返回代码:" + data);
            }
        },
        error : function(data) {
            alert('发送短信: 调用短信接口出错,请及时联系管理员!');
        }
    });
    */

您可能感兴趣的文章:

  • 浅谈JQuery+ajax+jsonp 跨域访问
  • jquery解决客户端跨域访问问题
  • 用jQuery与JSONP轻松解决跨域访问的问题
  • Jquery 跨域访问 Lightswitch OData Service的方法
  • jquery 跨域访问问题解决方法(笔记)
  • jquery下利用jsonp跨域访问实现方法
  • JQuery Ajax 跨域访问的解决方案
  • jQuery 跨域访问问题解决方法
  • jQuery 跨域访问解决原理案例详解

《jquery异步跨域访问代码.doc》

下载本文的Word格式文档,以方便收藏与打印。