Javascript倒计时演示

王朝html/css/js·作者佚名  2006-01-09
宽屏版  字体: |||超大  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >

<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312">

<meta http-equiv="Content-type" content="text/html;charset=gb2312" />

<head>

<title>No.Javascript倒计时演示</title>

</head>

<!-- 经常看到注册会员时,接受协议所用到的效果 -->

<BODY>

<textarea name="content" readonly>fsdf</textarea>

<input type="button" id="agree" value="请认真查看<服务条款和声明> (10)" onclick="location.href='xxxx.asp'">

</BODY>

</HTML>

<script type="text/javascript">

var settime=10;

var i;

var showthis;

document.all.agree.disabled=true;

for(i=1;i<=settime;i++) {

setTimeout("update("+i+")",i*1000);

}

function update(num) {

if(num==settime) {

document.all.agree.value="我同意";

document.all.agree.disabled=false;

}

else {

showthis=settime-num;

document.all.agree.value="请认真查看<服务条款和声明> ("+showthis+")";

}

}

</script>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有