js获取域名

方法一   

var domain = document.domain;

方法二

var domain = window.location.host;
posted @ 2020-07-07 21:23  阿波罗任先生  阅读(298)  评论(0)    收藏  举报