标签:
这个是一个简单的例子。不过挺多地方都用到了
就封装城一个简单的插件
1 <!--<input type="text" id="Re_email" /><a id="GetYzm">获取验证码</a> --> 2 <input type="text" id="Re_email" /><input type="button" id="GetYzm" value="获取验证码">
1 <script type="text/javascript"> 2 $("#GetYzm").Countdown({ 3 CountTime: 10, 4 BeforeSend: function () { 5 if($("#Re_email").val()=="") { 6 alert("邮箱不能为空"); 7 console.log("错误提示信息"); 8 return false; 9 } 10 return true; 11 }, 12 Action: function () { 13 console.log("向后台发送ajax消息"); 14 } 15 16 }); 17 </script>
实例地址:http://files.cnblogs.com/files/lyqweb/Countdown.rar
标签:
原文地址:http://www.cnblogs.com/lyqweb/p/5012313.html