日期:2014-05-20  浏览次数:20744 次

checkbox的置灰问题
有什么办法能让置灰了的checkbox在勾选全选的时候,选不中呢。。。

界面代码:

<z:table id='zteTable' sid="sieBoeHeadersMyBoeDS" border="0" turnpage='true' onFinished='setHiddenModify();' isexcel='false' isexcelconfig='true' style='width:100%; FLOAT:right;word-break:break-all;' pagesizelist='10,20,30,50'> <z:column id=col0 width="7%" resid='SieBoeHeadersQryV.allChoice' caption="" checkall="true" iskey="true"> <input type="checkbox" value="" prop="boeHeaderId" name='check1' /> <input type="hidden" id="salaryFlag" name="salaryFlag" prop="salaryFlag" /> <input type="hidden" id="source" name="source" prop="source" /> </z:column> <z:column id=col1 width="5%" resid='SieBoeHeadersQryV.NO' caption="" prop="$ROWNUM"/> <z:column id=col1 width="15%" resid='SieBoeHeadersQryV.boeNum' allowsort='true' caption="" prop="boeNum"/> <z:column id=col2 width="15%" resid='SieBoeHeadersQryV.boeTypeName' allowsort='true' caption="" prop="boeTypeName"/> <z:column id=col3 width="15%" resid='SieBoeHeadersQryV.employeeName' allowsort='true' caption="" prop="employeeName"/> <z:column id=col4 width="12%" resid='SieBoeHeadersQryV.CrateDate' allowsort='true' caption="" prop="creationDate" datatype='date'/> <z:column id=col5 width="20%" resid='SieBoeHeadersQryV.boeAbstract' allowsort='true' caption="" prop="boeAbstract"/> <z:column id=col6 width="10%" resid='SieBoeHeadersQryV.operation' caption="" prop="select"> <input type='hidden' id="boeHeaderId" name="boeHeaderId" value="" prop="boeHeaderId" width="100%"/> <input type='hidden' id="boeTypeCode" name="boeTypeCode" value="" prop="boeTypeCode" width="100%"/> <a href='#'>&nbsp;&nbsp;</a> <a href='#' onClick="toApprovalPage('zteTable',this)" resid='SieBoeHeadersQryV.lookup'></a> <a href='#'>&nbsp;&nbsp;&nbsp;&nbsp;</a> <a href='/apps/report/print/print.jsp?ids=${boeHeaderId}&types=${boeTypeCode}' target="_blank" resid='SieBoeHeadersQryV.printReport'></a> <a href='#'>&nbsp;&nbsp;&nbsp;</a> <a href='#' name="returnToSalary" onClick="salaryBoeInfo('zteTable',this)" resid='SieBoeHeadersQryV.returnToSalary'></a> </z:column> </z:table> </td>


现在是选择全选之后,置灰的也可以选中。。

------解决方案--------------------
写js, 遍历checkbox元素, 然后检测它的disable属性来判断他是否应该被选中.