XmlHttp 跨域访问
createXMLHTTP();
var url= "http://administrator.ccwb.net/SiteManager/PageRelease/AddReview.aspx?UserName= "+document.getElementById( "UserName ").value+ "&ReviewContent= "+document.getElementById( "ReviewContent ").value+ "&ReviewTitle= "+document.getElementById( "ReviewTitle ").value+ "&NewsID= "+document.getElementById( "NewsID ").value+ " ";
xmlHttp.open( "post ",url,true);
xmlHttp.onreadystatechange=regUserInfo;
xmlHttp.send(null);
createXMLHTTP(); 先创建的 xmlHttp对象
提交的时候权限不够不让访问 我知道是不能跨域,那怎么设置http://administrator.ccwb.net/服务器安全性
允许这个代码访问呢?这个代码页面的域名是http://test.ccwb.net
这是纯HTML页面的没有用到ASPX 或者有没有别的办法可以解决的
URL = “http://123/WebService.asmx/Add?Name=123”;
换成访问Web服务也不行`拒绝访问
这个怎么弄啊?
------解决方案--------------------
open( "method ", "URL "[, asyncFlag[, "userName "[, "password "]]])
Here are what these various parameters mean:
method: The HTTP method used to open the connection, such as GET, POST, PUT, HEAD, or PROPFIND.
URL: The requested URL.
asyncFlag: A Boolean value indicating whether the call is asynchronous. The default is true.
username: The user name.
password: The password.