📜  如果 localhost 有条件做出反应 - Javascript 代码示例
📅  最后修改于: 2022-03-11 15:02:33.330000             🧑  作者: Mango
代码示例1
if (location.hostname === "localhost" || location.hostname === "127.0.0.1")
alert("It's a local server!");