jquery中:input和input的区别分析
2011-07-13 00:00
741 查看
<script type="text/javascript"> $(function(){ $(":input").focus(function(){ $(this).addClass("focus"); }).blur(function(){ $(this).removeClass("focus"); }); })//这个效果第三个textarea也会添加样式 </script> <form action="" method="post" id="regForm"> <fieldset> <legend>个人基本信息</legend> <div> <label for="username">名称:</label> <input id="username" type="text" /> </div> <div> <label for="pass">密码:</label> <input id="pass" type="password" /> </div> <div> <label for="msg">详细信息:</label> <textarea id="msg" rows="2" cols="20"></textarea> </div> </fieldset> </form>
相关文章推荐
- jquery中:input和input的区别分析
- jquery中:input和input的区别分析
- jquery中attr和prop的区别分析
- jQuery中的.bind()、.live()和.delegate()之间区别分析
- jquery中$(#form :input)与$(#form input)的区别
- jQuery $("input")和$("<input>")的区别
- jQuery之DOM对象和jQuery对象的转换与区别分析
- jQuery中hover与mouseover和mouseout的区别分析
- Jquery选择器 input 和 :input的区别
- Jquery中offset()和position()的区别分析
- 【转】$_POST 与 php://input的区别分析
- jquery中事件委派代码分析以及jQuery中delegate和on的用法与区别详细解析
- jQuery中的.bind()、.live()和.delegate()之间区别分析
- jquery中$(":input")和$("input")有什么区别
- 对比分析AngularJS中的$http.post与jQuery.post的区别
- jquery中live()方法和bind()方法区别分析
- jquery 中$("form :input") $("form input") 区别
- Jquery中offset()和position()的区别分析
- jQuery中的.bind()、.live()和.delegate()之间区别分析