JQ批量控制form禁用
1 <script type="text/javascript" src="http://www.joy-city.com.cn/templets/default/script/jquery-1.8.2.min.js"></script> 2 <script type="text/javascript"> 3 $(document).ready(function(){ 4 $(".ddd input").attr("disabled","disabled"); 5 $(".ddd select").attr("disabled","disabled"); 6 }); 7 8 </script> 9 10 <div class="ddd"> 11 <input type="text" disabled> 12 <input type="text"> 13 <input type="text"> 14 <input type="text"> 15 <select name="DDLSex" id="DDLSex" runat="server"> 16 <option value="">--请选择--</option> 17 <option value="M" selected="selected">男</option> 18 <option value="F">女</option> 19 </select> 20 </div>
例: