夺命雷公狗jquery---8表单元素选择器
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <script src="js/jquery.js"></script> <script> window.onload = function(){ document.getElementById('btnok').onclick = function(){ //1.匹配所有表单元素 //$(":input").hide(3000); //2.匹配密码框 //$("input:password").hide(3000); //3.匹配多选框 $('input:checkbox').hide(3000); } } </script> </head> <body> <input type="button" id="btnok" value="匹配" /> <hr> <form> name:<input type="text" id="username" /> <hr /> pass:<input type="password" id="pass" /> <hr /> like:<input type="checkbox" value="足球">足球 <input type="checkbox" value="篮球">篮球 <input type="checkbox" value="兵乓球">兵乓球 <hr /> 个人简介:<textarea cols="40" rows="5"></textarea> <input type="submit" value="submit" /> </form> </body> </html>