在页面 iframe 过来的 会因为跨域而操作不了 这个页面吗
执行报错
Uncaught DOMException: Failed to read
the 'contentDocument' property from 'HTMLIFrameElement':
Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.(…)
求大神指导
在页面 iframe 过来的 会因为跨域而操作不了 这个页面吗
执行报错
Uncaught DOMException: Failed to read
the 'contentDocument' property from 'HTMLIFrameElement':
Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.(…)
求大神指导
10 回答11.1k 阅读
6 回答3k 阅读
5 回答4.8k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.7k 阅读✓ 已解决
3 回答2.3k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
You can't. XSS protection. Cross site contents can not be read by javascript. No major browser will allow you that. I'm sorry, but this is a design flaw, you should drop the idea.
more