function Myreport1() {
var myDate = new Date();
$.ajax({
url: "http://product.uzai.com:81/Product.ashx?ProductID=28748",
data: { datetime: myDate.getTime() },
dataType: "text",
success: function (temp) {
alert(decodeURIComponent(temp));
}
});
}
该AJAX中URL我写发布好的ashx连接会报JS错,但是我写我程序里的路径是可以的,求解,url我怎么写我发布在IIS里的路径
var myDate = new Date();
$.ajax({
url: "http://product.uzai.com:81/Product.ashx?ProductID=28748",
data: { datetime: myDate.getTime() },
dataType: "text",
success: function (temp) {
alert(decodeURIComponent(temp));
}
});
}
该AJAX中URL我写发布好的ashx连接会报JS错,但是我写我程序里的路径是可以的,求解,url我怎么写我发布在IIS里的路径
请检查此路径是否正确.
浏览器默认是禁止脚本进行跨域操作的。
如果是跨域的话,就牵涉到ajax跨域的问题
LZ可以去尝试用一下ajax jsonp来让别人调用
Ajax跨域访问解决方案