jQuery ajax 跨域

后台:string r1 = "cd('xxx')";
            return r1;

前端:

function cs() {
            $.ajax({
                type:"get",
                url: "http://localhost:10993/Home/cs",/*url写异域的请求地址*/
                dataType:"jsonp",/*加上datatype*/          
                success:function(){                 
                }
            });
        }
        function cd(a) {
            alert(a)
        }

猜你喜欢

转载自blog.csdn.net/k195514239/article/details/85838582