明飞的技术园地

笨鸟先飞
  博客园  :: 新随笔  :: 联系 :: 管理

随机跳转

Posted on 2010-02-07 15:10  明飞  阅读(145)  评论(0编辑  收藏  举报

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

<head>
    <title>Untitled Page</title>
</head>

<script language="javascript" type="text/javascript">

function OpenLink()
{
    var now= new Date();
    var year=now.getYear();
    var month=now.getMonth()+1;
    var day=now.getDate();
    var hour=now.getHours();
    var minute=now.getMinutes();
    var second=now.getSeconds();
    var ul='';
    var ys;
    ys=second%4;
     // alert(ys);
     // alert(year+"-"+month+"-"+day+" "+hour+":"+":"+minute+":"+second);
    switch(ys)
    {
        case 0:
            ul='http://www.ccb.com';
            break;
        case 1:
             ul='http://www.163.com';
            break;
        case 2:
             ul='http://www.sohu.com';
            break;
        case 3:
             ul='http://www.qq.com';
            break;
        default:
            ul='http://www.163.com';
    }
    //alert(ul);
    window.location.href=ul;//这是直接在当前页跳转
}
function test()
{
    alert("");
}
</script>
<body link="#191070">

<input id="Button1" type="button" onclick ="OpenLink()"  value="观看流媒体" style="width: 119px"  />
 
</body>
</html>