console.log(window.location.hostname)//web主机域名
console.log(window.location.pathname)//当前页面路径及文件名
console.log(window.location.port)//web主机端口
console.log(window.location.protocal)//所使用的web协议
console.log(window.location.hostname)//web主机域名
console.log(window.location.pathname)//当前页面路径及文件名
console.log(window.location.port)//web主机端口
console.log(window.location.protocal)//所使用的web协议
本文标题:JavaScript获取web域名
本文链接:https://www.haomeiwen.com/subject/xvxsvctx.html
网友评论