验证一个表单需要干的事情
2015-08-05 11:26
302 查看
1. 当元素失去焦点时发生 blur 事件。
http://www.runoob.com/jquery/event-blur.html
2. 当输入框获取焦点的时候,触发的事件。
http://www.runoob.com/jquery/event-focus.html
3. 当键盘键被松开时发生 keyup 事件。
http://www.runoob.com/jquery/event-keyup.html
4. 当表单提交的时候触发的事件。
http://www.runoob.com/jquery/event-submit.html
JQuery 的事件列表:http://www.runoob.com/jquery/jquery-ref-events.html
$("input").blur(function(){ alert("This input field has lost its focus."); });
http://www.runoob.com/jquery/event-blur.html
2. 当输入框获取焦点的时候,触发的事件。
$("input").focus(function(){ $("span").css("display","inline").fadeOut(2000); });
http://www.runoob.com/jquery/event-focus.html
3. 当键盘键被松开时发生 keyup 事件。
$("input").keyup(function(){ $("input").css("background-color","pink"); });
http://www.runoob.com/jquery/event-keyup.html
4. 当表单提交的时候触发的事件。
$("form").submit(function(){ alert("Submitted"); });
http://www.runoob.com/jquery/event-submit.html
JQuery 的事件列表:http://www.runoob.com/jquery/jquery-ref-events.html
相关文章推荐
- for vs foreach
- DateTime.Now.ToString()总结
- extjs,后台递归获取权限树,进行展示
- 10. CSS 文本
- typedef 用法
- 性能优化之Java(Android)代码优化
- Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushM
- Mockito(二)--实例篇
- How to find indexPath for tapped button in tableView Using Seque
- 《父与子的编程之旅-与小卡特一起学python》第18章
- Automation服务器不能创建对象--Excel.application
- windows核心编程学习体会1:获取进程实例句柄
- Android MediaPlayer状态机
- laravel 安装及入门
- http缓存
- Apache优化:修改最大并发连接数
- AIX系统修改系统时间
- Eclipse下Tomcat配置
- 南邮 OJ 1226 数字三角形问题
- Mockito(一) -- 入门篇