jquery checked选择器 语法
jquery checked选择器 语法
作用::checked 选择器选取所有选中的复选框或单选按钮。直线电机参数
语法:$(":checked")
jquery checked选择器 示例
<html> <head> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".btn1").click(function(){ $(":checked").hide(); }); }); </script> </head> <body> <form action=""> <input type="radio" name="sex" value="male" checked="checked"/> Male <br /> <input type="radio" name="sex" value="female" /> Female <br /> I have a bike: <input type="checkbox" name="vehicle" value="Bike" /> <br /> I have a car: <input type="checkbox" name="vehicle" value="Car" checked="checked" /> <br /> I have an airplane: <input type="checkbox" name="vehicle" value="Airplane" /> </form> <button class="btn1">Hide Checked Options</button> </body> </html>
相关推荐
EdwardSiCong 2020-11-23
85477104 2020-11-17
hhanbj 2020-11-17
81427005 2020-11-11
seoppt 2020-09-13
honeyth 2020-09-13
WRITEFORSHARE 2020-09-13
84483065 2020-09-11
momode 2020-09-11
85477104 2020-08-15
83510998 2020-08-08
82550495 2020-08-03
tthappyer 2020-08-03
84901334 2020-07-28
tthappyer 2020-07-25
TONIYH 2020-07-22
tztzyzyz 2020-07-20
83510998 2020-07-18
81463166 2020-07-17