JS根据不通的域名显示不同的备案号和内容,代码如下:
<p> <a href="https://beian.miit.gov.cn/" target="_blank" id="ICP" rel="nofollow" >冀ICP备****号</a> </p> <script> var yuming = window.location.host; if (yuming == "www.a*.com" || yuming == "a*.com") { document.getElementById("ICP").innerHTML = "冀ICP备****号"; } else if (yuming == "b*.com") { document.getElementById("ICP").innerHTML = "豫ICP备****号"; } </script>