admin管理员组

文章数量:1567543



<!DOCTYPE html>

<html>

    <head>

        <title>Test</title>

    </head>

     <script type="text/javascript"> 

       function ip(){

var hrefValue = window.location.href;//获取当前地址

   if(hrefValue!="你想跳转的域名")//JS中变量都是var型,可直接比较

  window.location.href="你想跳转的域名";

}

    </script>


<body  οnlοad="ip()">//此种写网页打开时便自动触发ip()函数,也可直接在<script>window.load=function ip();</script>这样写,效果一样的

...................................................

</body>


本文标签: 域名跳转到两个网页