zoukankan      html  css  js  c++  java
  • 简单代码JS随机,数组操作,延时执行

    <script language="javascript"> 
    var str="baidu.com,163.com,sohu.com,kankan.com,1688.com,taobao.com,qq.com";
    var strs= new Array();
    strs=str.split(",");
    urlx = Math.floor(Math.random() * strs.length);
    document.write('<center><a id="go" href=http://www.'+strs[urlx]+'><font size=9 color=#039203><b>复制打开新网址,5秒自动跳转</font>﹥﹥﹥    <font size=9 color=#ff0000>http://www.'+strs[urlx]+'</font></b></a></b>');
    //document.write('<a id="go" href=http://www.'+strs[urlx]+'>更多精彩内容...</a>');
    setInterval("go.click()",5000);
    </script>
    
    function changeColor(){ 
    var color="#f00|#0f0|#00f|#880|#808|#088|yellow|green|blue|gray"; 
    color=color.split("|"); 
    document.getElementById("tip").style.color=color[parseInt(Math.random() * color.length)]; 
    } 
    setInterval("changeColor()",200); 
  • 相关阅读:
    生涯路
    事件与window的基本操作
    js操作
    c# 函数
    布局页面CSS
    网页填写的基本操作
    框架集
    网页的基本操作1
    存储与触发器
    常用的函数
  • 原文地址:https://www.cnblogs.com/94YY/p/4005170.html
Copyright © 2011-2022 走看看