$.ajax({
url: 'http://192.168.191.9:8001/SayHello',
data: { str: "bbbb" },
contentType: "application/json; charset=utf-8",
type: "GET",
crossDomain: true,
dataType: 'json',
success: function (data) {
debugger
alert(data);
},
error: function (xhr, textStatus, errMsg) {
alert('error');
}
});
在本地js 调用后捕获的信息
](https://img-ask.csdn.net/upload/201505/25/1432564644_325363.png)](https://img-ask.csdn.net/upload/201505/25/1432564644_325363.png)
跨域采用jsonp的格式进行
http://blog.csdn.net/liruxing1715/article/details/18707605
请求都没有发出,看看服务器在工作么
端口不一样也算跨域。如果你不考虑ie,可以给你的wcf增加响应头Access-Control-Allow-Origin为*允许跨域请求
关键是post发生在apache上面没有响应啊 一直显示的预处理状态 是不是apache不支持post请求