【综合工具】js判断当前域名是否符合,不符合跳转 2022年11月27日 16:47:38综合工具 $(document).ready(function(){ if(location.toString().indexOf("boxmoe.com") <= -1) /*如果当前网址中没有boxmoe.com*/ { document.location.href="https://www.boxmoe.com/"; /*跳转到https://www.boxmoe.com*/ } else { /*有的话,执行代码*/ } }) 本站QQ群:1028555377,点击加入 联系站长:QQ2726054311