js获取当前URL、域名、端口号
2021-03-29 13:25
标签:class protoc tail window ref style let href std 正常使用 js获取当前URL、域名、端口号 标签:class protoc tail window ref style let href std 原文地址:https://www.cnblogs.com/yixiancheng/p/12607819.html
let protocol = window.location.protocol,
host = window.location.host;
let url = `${protocol}//${host}`;