Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么我可以向具有跨域地址的 iframe 提交表单,但无法向该地址发送 XMLHTTPRequest?
原因很简单,您的代码看不到 iframe 帖子的结果。您的脚本将被拒绝访问 iframe 的 DOM。
请记住,这实际上是浏览器的安全模型,而不是 JavaScript 的。