📜  窗口位置主机与来源 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:17.801000             🧑  作者: Mango

代码示例1
console.log(window.location.host); // localhost:3000
console.log(window.location.hostname); // localhost
console.log(window.location.origin); // http://localhost:3000