XMLHtt prequest从硬盘上保存的网页 [英] XMLHttpRequest from saved page in hard disk
本文介绍了XMLHtt prequest从硬盘上保存的网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我救了一个页面在硬盘上,然后我打开了它,并想从已保存的HTML文件连接到互联网上的服务器的网站。当试图做使用 XMLHtt prequest
从装载在浏览器中手动将文件中的HTTP请求,它基本上做不到。能否请你告诉我,我应该怎么办?或者,这可能吗?
I saved a page on a hard drive then I opened it and wanted to connect from a saved html file to the server website on the Internet. When trying to do a HTTP request using XMLHttpRequest
from a file that were loaded in browser manually, it basically fails to do. could you please tell me what should i do? Or is it possible?
推荐答案
除非是跨域xmlHtt prequest,它会由于同源策略的失败。
Unless it is a cross domain xmlHttpRequest, it will fail due to same-origin policy.
这篇关于XMLHtt prequest从硬盘上保存的网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文