<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="keywords" content="站长,网页特效,js特效,广告代码,zzjs,zzjs.net,sky,www.zzjs.net,站长特效 网" /> <meta name="description" content="www.zzjs.net,站长特效网,站长必备js特效及广告代码。大量高质量js特效,提供高质量广告代码下载,尽在站长特效网" /> <title>点击提交按钮后变成灰色不可再次点击,sky整理收集,站长特效欢迎您。</title> </head> <body> <a href="<#ZC_BLOG_HOST#>">站长特效网</a>,站长必备的高质量网页特效和广告代码。zzjs.net,站长js特效。<hr> <!--欢迎来到站长特效网,我们网站收集大量高质量js特效,提供许多广告代码下载,网址:www.zzjs.net,zzjs@msn.com,用.net打造靓站--> <form name=form1 method="POST" action="http://www.zzjs.net" target=_blank> <input type="text" name="T1" size="20"><input type="button" value="提交" onclick="javascript:{this.disabled=true;document.form1.submit();}"> <input type="reset" value="重置" name="B2">
<title>点击获取验证码按钮后按钮变灰,倒计时一段时间后又可重复点击</title> </head> <body> <input type="button" id="btn" value="免费获取验证码" /> <script type="text/javascript"> var wait=60; function time(o) { if (wait == 0) { o.removeAttribute("disabled"); o.value="免费获取验证码"; wait = 60; } else { o.setAttribute("disabled", true); o.value=wait+"秒后可以重新发送"; wait--; setTimeout(function() { time(o) }, 1000) } } document.getElementById("btn").onclick=function(){time(this);} </script>
function update(num) { var secs = 60 * 5; if (num == secs) { $("#btnResendFax").val("发送传真"); $("#btnResendFax").attr("disabled", false); } else { printnr = secs - num; $("#btnResendFax").val("发送中,距离下次操作还剩" + printnr + "秒"); $("#btnResendFax").attr("disabled", true); } }
function pause() { var a2 = document.getElementById(‘a2‘); a2.setAttribute(‘disabled‘, ‘false‘) setTimeout(function() { a2.removeAttribute(‘disabled‘); }, 3000); } </form> </body> </html>
原文:http://www.cnblogs.com/luoge/p/4367389.html