Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

必须在请求页面有一个iframe吗? #3

Open
zhimma opened this issue Jun 12, 2017 · 1 comment
Open

必须在请求页面有一个iframe吗? #3

zhimma opened this issue Jun 12, 2017 · 1 comment

Comments

@zhimma
Copy link

zhimma commented Jun 12, 2017

https://github.com/tsrot/study-notes/blob/master/html5%20API%20postMessage%E8%B7%A8%E5%9F%9F%E8%AF%A6%E8%A7%A3.md
必须在请求页面有一个iframe吗?能不能类似Ajax直接从服务器获取数据 a.com 直接从b.com/b.php获取数据。

@tsrot
Copy link
Owner

tsrot commented Jun 12, 2017

可以,那就是使用jsonp方式跨域了。这里介绍的是postMessage跨域

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants