mjc 发表于 2007-4-27 11:18:43

***时间日期***也是一个能在form中显示时间的脚本,这个带上了开关

把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件
要完成此效果把如下代码加入到<body>区域中

<script language="javascript">

    var enabled=0;   

function tofunc() {      

    to = window.settimeout( "tofunc()", 1000

);      

    var today = new date();   

    document.clock.disp.value =

today.tolocalestring();

    }


</script>

                  <form name="clock">

                  <input type="text" name="disp" value="" size=20

onfocus="this.blur()" >

                  <br>

                  <input type="radio" name="rad" value="off"

onclick="

if( enabled==1 )

    {

   document.clock.disp.value='';

   cleartimeout( to );

   enabled = 0;

   }

   " checked>

                  关<font color="#ffff99"> </font>

                  <input type="radio" name="rad" value="on"

onclick="

   if( enabled == 0 ) {

      var to = settimeout( 'tofunc()', 1000 );

      enabled = 1;   }" >

                  开<font color="#ffff99"> </font>

                  </form>
      











---------- ------ - --- ------- - ----------

http://w ww.huoyue.com.cn 活跃 网,活跃人群的论坛,访问活跃网,将给您带来意想不到的收获,还可 以免 费为您开论坛,让您免 费拥有与朋友、网友交流的 论坛。你是 年轻人吗?你活 跃你就上!
页: [1]
查看完整版本: ***时间日期***也是一个能在form中显示时间的脚本,这个带上了开关