Javascript应用--实现倒计时按钮效果
2010-12-28 18:59
701 查看
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script type="text/javascript">
var count = 3;
function butTime()
{
var butNode = document.getElementById("butid");
//alert(butNode.value);
butNode.disabled = true;
butNode.value = "同("+count+")意";
count--;
if(count==-1)
{
butNode.value = "同 意";
butNode.disabled = false;
window.clearInterval(time);
}
}
var time;
window.onload = function()
{
butTime();
time = window.setInterval("butTime()",1000);
}
</script>
</head>
<body>
<input id="butid" type='button' value="" />
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script type="text/javascript">
var count = 3;
function butTime()
{
var butNode = document.getElementById("butid");
//alert(butNode.value);
butNode.disabled = true;
butNode.value = "同("+count+")意";
count--;
if(count==-1)
{
butNode.value = "同 意";
butNode.disabled = false;
window.clearInterval(time);
}
}
var time;
window.onload = function()
{
butTime();
time = window.setInterval("butTime()",1000);
}
</script>
</head>
<body>
<input id="butid" type='button' value="" />
</body>
</html>
相关文章推荐
- javascript时间排序算法实现活动秒杀倒计时效果
- JavaScript实现输入框与清空按钮联动效果
- javascript倒计时效果实现
- jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- javascript特效实现(4)——当前时间和倒计时效果
- javascript点击按钮实现隐藏显示切换效果
- 基于JavaScript实现手机短信按钮倒计时(超简单)
- jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- js实现按钮重新发送验证码倒计时效果
- 基于JavaScript实现自动更新倒计时效果
- jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- JavaScript:使用js实现发送邮箱验证码,按钮倒计时
- jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- javascript电商网站抢购倒计时效果实现
- jquery 实现 点击按钮后倒计时效果