用JS获取当前域名并判断获取域名host = window.location.hosthost2=document.domainif(host!="xxx.com") alert("illegal")您好!很高兴为您答疑2023-02-21JavaScript50