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

[js] 第357天 document.domain的作用是什么?它有什么限制? #2200

Open
haizhilin2013 opened this issue Apr 6, 2020 · 2 comments
Labels
js JavaScript

Comments

@haizhilin2013
Copy link
Collaborator

第357天 document.domain的作用是什么?它有什么限制?

我也要出题

@haizhilin2013 haizhilin2013 added the js JavaScript label Apr 6, 2020
@gongxic
Copy link

gongxic commented Apr 7, 2020

  1. document.domain 能够实现部分情况下的跨域访问的问题。
  2. 两个域名必须属于同一个基础域名!而且所用的协议,端口都要一致
    (端口可以在两个页面都设置domain,将端口重置为null 来实现跨域)

@bozaigao
Copy link

bozaigao commented Oct 9, 2020

document.domain可以实现基于同一个基础域名的两个不同域名实现跨域访问。

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

No branches or pull requests

3 participants