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里的路径

解决方案 »

  1.   

    http://product.uzai.com:81/
    请检查此路径是否正确.
      

  2.   

    如果要交给别人用,请问是在同一个域名下吗?
    浏览器默认是禁止脚本进行跨域操作的。
    如果是跨域的话,就牵涉到ajax跨域的问题
      

  3.   

    给别人用ajax请求你服务器上的ashx页面是属于跨域了
    LZ可以去尝试用一下ajax jsonp来让别人调用
      

  4.   

    可以参考http://hszy00232.blog.163.com/blog/static/43022753201061011444953/
    Ajax跨域访问解决方案  
      

  5.   

    你这是跨域了。dataType使用jsonp
      

  6.   

    如果是跨域访问 。得用jsonp
      

  7.   

    既然是一般处理程序,用什么ajax啊,写个webservice不好吗