W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <script type="text/javascript" src="/jquery/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".btn1").click(function(){ $(":checked").hide(); }); }); </script> </head> <body> <form action="/demo/demo_form.asp"> <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>