我已经创建了类型post.When我从jquery ajax发送数据的服务不起作用。类型GET的方法正常工作。 我需要与职位类型也是。什么是解决方案。请帮助。jquery跨域问题!
var user = document.getElementById("uname").value;
var pass = document.getElementById("pass").value;
var utyp = document.getElementById("usertyp").value;
// alert("hi"+pass);
var dat = { "uname": user, "pwd": pass, "utype": utyp };
Data = JSON.stringify(dat);
$.ajax({
url: "http://192.168.1.9:450/Service.svc/Login_Insert",
type: "POST",
data:Data,
contentType: "application/json; charset=utf-8",
dataType: "jsonp",
processdata: true,
success: function res(msg) {
alert("hello" + msg);
},
error: function error(response) {
alert("error");
alert(response.responseText);
alert(JSON.stringify(response));
}
});
问候, 吉瑞普山
你为什么不这里发表您的代码示例。 – check123 2011-05-14 06:39:24
@GIRI,发布您的代码... – kobe 2011-05-14 06:41:54
请检查现在 – user601367 2011-05-14 06:49:56