大佬教程收集整理的这篇文章主要介绍了jquery – 在表行中启用“禁用控件”,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
HTML
<table id="table_forms"> <tr> <td><input type="checkBox" class="chkView"/>View</td> <td><input type="checkBox" class="chkEdit" disabled/>Edit</td> <td><input type="checkBox" class="chkdelete" disabled/>delete</td> </tr> <tr> <td><input type="checkBox" class="chkView"/>View</td> <td><input type="checkBox" class="chkEdit" disabled/>Edit</td> <td><input type="checkBox" class="chkdelete" disabled/>delete</td> </tr> </table>
JS:
$(document).on('change','.chkView',function(){ var row = $(this).closest('tr'); if($(this).prop("checked",truE)) { $(row).find('.chkEdit').prop("disabled",falsE); $(row).find('.chkdelete').prop("disabled",falsE); } else { $(row).find('.chkEdit').prop("disabled",truE); $(row).find('.chkdelete').prop("disabled",truE); } });
以上是大佬教程为你收集整理的jquery – 在表行中启用“禁用控件”全部内容,希望文章能够帮你解决jquery – 在表行中启用“禁用控件”所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。