📌  相关文章
📜  如何检查 localhost javascript 代码示例

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

代码示例1
if (location.hostname === "localhost" || location.hostname === "127.0.0.1")
    alert("It's a local server!");