开发者

Open Ajax Issue

开发者 https://www.devze.com 2022-12-16 16:31 出处:网络
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 so

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

精彩评论

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