Jquery常用技巧(1)
2013-04-11 13:38
357 查看
1、以name为选择对象时:
<input name="password" type="password" class="person_txt"/>
$("input[name=password]").bind('blur',function(){} //失去焦点时触发
$("input[name=password]").bind('focus',function(){} //进入焦点时触发
2、以id为选择对象时:
<input id="password" type="password" class="person_txt"/>
$("#password").bind('blur',function(){} //失去焦点时触发
$("#password").bind('focus',function(){} //进入焦点时触发
<input name="password" type="password" class="person_txt"/>
$("input[name=password]").bind('blur',function(){} //失去焦点时触发
$("input[name=password]").bind('focus',function(){} //进入焦点时触发
2、以id为选择对象时:
<input id="password" type="password" class="person_txt"/>
$("#password").bind('blur',function(){} //失去焦点时触发
$("#password").bind('focus',function(){} //进入焦点时触发
相关文章推荐
- jquery常用技巧及常用方法列表集合
- jquery的常用技巧(四)
- jQuery常用技巧大放送
- Jquery常用技巧
- 12招jQuery常用技巧
- jQuery常用技巧大放送
- jQuery常用技巧大放送
- jQuery常用技巧
- 12招jQuery常用技巧
- js,Jquery,ajax常用方法技巧
- jquery教程之分享jquery常用技巧
- jquery常用技巧
- jQuery常用技巧大放送
- jQuery常用技巧
- Spring portlet mvc jquery 开发常用技巧
- jQuery的12招常用技巧分享
- jQuery的12招常用技巧分享
- jQuery常用技巧
- Jquery常用技巧和方法收集
- 12条jquery常用技巧和方法整理列表