HTML 实现网页跳转

<!DOCTYPE html>

<!--
<html lang="en">
<head>
    <meta charset="UTF-8">
    
<title>Title</title>
</head>

<body>
    
<iframe src="https://www.baidu.com/" id="frame1" style="width: 100%;height: 2000px;"></iframe>

</body>
<script>


    
var repet = function(){
        var ff = false,url;
        
setInterval( function(){
            
          if(ff){
                url="https://www.baidu.com//"; //报表1 链接
                
                 ff = false;
            }
          else{
                  url="http://www.sina.com"; ////报表2 链接
                
                 ff = true;
            }
            
                  document.getElementById("frame1").src = url;
        },10000);
    }
    
(function(){
        repet();
    })()



</script>
</html>
-->

 

posted on 2016-08-19 09:37  优来忧往  阅读(672)  评论(0编辑  收藏  举报