//获得urlvar url = document.URL;//获得域名var domain = document.domain;//取得源页面的urlvar referrer = document.referrer;
1. 对domian赋值不能跨域
比如在show.17173.com;
document.domain = 17173.com; //success
doucment.domain = baidu.com;// fail
2. 只能向下赋值
比如在show.17173.com;
document.domain = 17173.com; //success
document.domani = show.17173.com // fail