js 跨域请求

 function () {
    jQuery.support.cors = true;
    $.ajax({
        type: "post",
        url: "...",
        data: {
           
        },
        xhrFields: {
            withCredentials: true
        },
        success: function (result) {
                alert(result.Msg);
        },
        error: function (err) {
            console.log(err);
        }
    });

  

posted @ 2018-03-12 11:12  caolingyi  阅读(92)  评论(0编辑  收藏  举报