今天是

爱酷家


当前位置:首页 > 资源收藏 > 特效代码

带开关的时间特效

收集整理   发布时间:2012-10-23 21:36:00   阅读

带开关的时间特效

演示:

代码:
<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=22 onFocus="this.blur()">
<br>
<input type="radio" name="rad" value="OFF" checked onClick="
  if( enabled==1 ) 
    {document.clock.disp.value='';
     clearTimeout( TO ); 
     enabled = 0;}
   "> 关
<input type="radio" name="rad" value="on"  onClick="
     if( enabled == 0 ) {
        var TO = setTimeout( 'TOfunc()', 1000 );
        enabled = 1;     }" > 开
</form>

 



注:⊙如转载本站原创作品,请务必包保留本文地址:

内容: