开关时钟
2014-09-09来源:易贤网

<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>

插入到网页中看看

更多信息请查看IT技术专栏

2025公考·省考培训课程试听预约报名

  • 报班类型
  • 姓名
  • 手机号
  • 验证码
推荐信息