开发者

Open Ajax Issue

When I run my ajax file, a problem caused by XMLHttpRequestObject.open("GET", dataSource,true) occurs. It is said that " Access to restricted URI denied" code: "1012" ". Does anyone know the solution? Th开发者_StackOverflow中文版anks in advance!


You are probably trying to access a file on another domain. This is forbidden in AJAX for obvious security reasons.

If the data source is one you control, try using JSONP in order to circumvent this restriction. Otherwise, you're out of luck for the most part, unless you want use server-side code to route the request through your own server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜