为什么我的代码$("input").attr("disabled", "true");写成这样按钮才会灰,反而$("form*").attr("disabled", "true");这样却没效果呢?
<!DOCTYPE html> <html> <head> <title>*选择器</title> <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script> </head> <body> <form action="#"> <input id="Button1" type="button" value="button" /> <input id="Text1" type="text" /> <input id="Radio1" type="radio" /> <input id="Checkbox1" type="checkbox" /> </form> <script type="text/javascript"> $("input").attr("disabled", "true"); </script> </body> </html>