码迷,mamicode.com
首页 > 其他好文 > 详细

ce shi

时间:2015-10-16 20:32:30      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <style>body{
    
    
}


#tb1,#tb2
{
    display
:none;
    
}

    
#an
{
    margin-top
:50px;
    margin-left
:200px;
    width
:500px;
    height
:200px;
    padding
:0px 60px;
    font-color
:#333;
    font-size
:50px;
    background-color
:transparent;
    border
:#F00 dashed 1px;
    text-align
:center;
    line-height
:100px;
    
}

#select
{
    position
:absolute;
    top
:30px;
    margin-left
:380px;
    padding
:0px 20px;
    width
:150px;
    border
:none;
    color
:#000;
    font-size
:20px;
    
}
#select,#an
{
    cursor
:hand
    
}


#da
{
    position
:absolute;
    top
:260px;
    margin-left
:500px;
    
}
p
{
    position
:absolute;
    top
:260px;
    margin-left
:500px;
    
}
a
{
    text-decoration
:none;
    
}
a:link
{
    color
:#00C;
    
}
a:visited
{
    color
:#00C;
    
}
a:hover
{
    color
:#F00;
    
}</style>
       
    </head>
    <body>
 
<script type="text/javascript">var mytime=null;
var num;
function doit()
{
    var bt=window.document.getElementById("an");
        if(mytime==null)
    {
        change();
        }
        else
        {
            clearTimeout(mytime);
            mytime=null;
        }
}

function change()
{
    num=document.form.select.value;
    switch(num)
    {
        case "01":show_1();break;
        case "02":show_2();break;
        }
        
    }

function show_1()
{
    var x=document.getElementById("tb1").rows[parseInt(tb1.rows.length*Math.random())].cells;
    an.value=x[0].innerHTML;
    mytime=setTimeout("show_1()",1);
    }
    
function show_2()
{
    var x=document.getElementById("tb2").rows[parseInt(tb2.rows.length*Math.random())].cells;
    an.value=x[0].innerHTML;
    mytime=setTimeout("show_2()",1);
    }
    
function te()
{
    var d=new Date();
    var t=document.getElementById("da");
    t.innerHTML=d.getFullYear()+‘-‘+(d.getMonth()+1)+‘-‘+d.getDate()+"\r\n"+
    d.getHours()+":"+d.getMinutes()+":"+d.getSeconds()
    }
window.setInterval("te()",1000);</script>
<form name="form">
<select name="select" id="select">
        <option value="01">信管01班</option>
        <option value="02">信管02班</option>
</select>
</form>

<div><input type="button" onclick="doit()" id="an" value="Begin!" /></div><br />
<div id="da"></div>
<p>From: <target=_blank href="http://blog.csdn.net/lxh_gdmu?viewmode=contents" target="_blank">桑海田</a></p>
    </body>
    
   <table id="tb1">
   <tr height="18.67" style="height:14.00pt;mso-height-source:userset;mso-height-alt:280;">
    <td class="xl66" height="18.67" style="height:14.00pt;" x:str="">**会</td>
   </tr>
   <tr height="18.67" style="height:14.00pt;mso-height-source:userset;mso-height-alt:280;">
    <td class="xl66" height="18.67" style="height:14.00pt;" x:str="">张三</td>
   </tr>
   <tr height="18.67" style="height:14.00pt;mso-height-source:userset;mso-height-alt:280;">
    <td class="xl66" height="18.67" style="height:14.00pt;" x:str="">李四</td>
   </tr>
  </table>
  
  <table id="tb2">
   <tr height="18.67" style="height:14.00pt;mso-height-source:userset;mso-height-alt:280;">
    <td class="xl66" height="18.67" width="72" style="height:14.00pt;width:54.00pt;" x:str="">刘备</td>
   </tr>
   <tr height="18.67" style="height:14.00pt;mso-height-source:userset;mso-height-alt:280;">
    <td class="xl66" height="18.67" style="height:14.00pt;" x:str="">王五</td>
   </tr>
   <tr height="18.67" style="height:14.00pt;mso-height-source:userset;mso-height-alt:280;">
    <td class="xl66" height="18.67" style="height:14.00pt;" x:str="">张飞</td>
   </tr>
  </table>

</html>

ce shi

标签:

原文地址:http://www.cnblogs.com/lxh-boke/p/4886161.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!