- 0133技术站
- 联系QQ:18840023
- QQ交流群

- 微信公众号

jQuery :button 选择器
定义和用法
:button 选择器选取带有 type=button
的 button 和 input 元素。
提示:通过该选择器使用 input:button
不会选取 button 元素。
<script> $(document).ready(function(){ $(":button").css("background-color","pink"); }); </script> </head> <button type="button">按钮</button> <input type="button" value="另外一个没用的按钮"><br>
点击 "运行实例" 按钮查看在线实例
效果图:
推荐手册