防止JS文件被恶意引用,防盗跳转 host = window.location.host; if (host != "baidu.com") { location.href = "http://www.baidu.com"; }转载张洪儒