防止JS文件被恶意引用host = window.location.host; if (host != "baidu.com") { location.href = "http://www.baidu.com"; } © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏