Extjs:将外部 url 内容加载为纯文本/文本
如何将 XML 或 JSON 等 URL 内容作为纯文本/文本加载到变量中?
我不想使用 JsonStore 或 XMLStore,我想将内容作为文本加载。
How can I load url contents like XML or JSON as a plain/text into a variable?
I don't wanna use JsonStore or XMLStore, I want to load the contents as a text.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看 http://www.sencha.com/learn/legacy/Manual :Core:Ext.Ajax 难道你不应该能够将结果写入变量吗?
该示例是从文档页面中提取的。
Looking at http://www.sencha.com/learn/legacy/Manual:Core:Ext.Ajax shouldn't you just be able to write the result into a variable?
The example was lifted from the docs page.
无法通过 Ajax 请求外部 URL。最初开发 Ajax 时。这几乎是可能的,但后来由于安全问题它被放弃了。您可以尝试原始格式的ajax。
尝试将 yourPage.php 网址更改为某个外部站点。您将收到响应错误。
https://developer.mozilla.org/En/HTTP_Access_Control。阅读本文以了解有关跨站点 HTTP 调用的更多信息。
External URL through Ajax requests are not possible. Initially when Ajax was developed. It was pretty much possible but later on due to security issues it was abandoned. You can try ajax in raw format.
Try changing the yourPage.php url to some external site. You will get error in response.
https://developer.mozilla.org/En/HTTP_Access_Control. Read this article for more info on Cross-site HTTP calls.