码迷,mamicode.com
首页 > 其他好文 > 详细

(JQ插件)获取验证码

时间:2015-12-02 12:21:09      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:

这个是一个简单的例子。不过挺多地方都用到了

就封装城一个简单的插件  

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

(JQ插件)获取验证码

标签:

原文地址:http://www.cnblogs.com/lyqweb/p/5012313.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!