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

  

原文地址:https://www.cnblogs.com/caolingyi/p/8548213.html