<tr>
<td colspan= "4 " nowrap= "nowrap "> <input type= "checkbox " id=n name= "IS_CASH " checked onClick= "aa() " value=y> 现金方式 </td>
</tr>
<tr>
<td nowrap= "nowrap "> 财务凭证号 </td>
<td> <input size=26 TYPE= "text " name= "CASH_VOUCHER " id=a5> </td>
<td nowrap= "nowrap "> <%if DEBT_TYPE=0 then%> 已提取的减值准备 <%end if%> </td>
<td> <%if DEBT_TYPE=0 then%> <input size=26 TYPE= "text " name= "CASH_DEC_AMOUT " > <%end if%> </td>
</tr>
<tr>
<td colspan= "4 " nowrap= "nowrap "> <input type= "checkbox " id=n name= "IS_CASH " checked onClick= "aa() " value=y> 达到方式 </td>
</tr>
---------------------------------------------------
<tr>
<td nowrap= "nowrap "> 财务 </td>
<td> <input size=26 TYPE= "text " name= "CASH " id=a5> </td>
<td nowrap= "nowrap "> <%if DEBT_TYPE=0 then%> 准备 <%end if%> </td>
<td> <%if DEBT_TYPE=0 then%> <input size=26 TYPE= "text " name= "CASH_DEC " > <%end if%> </td>
</tr>
有多个复选框和文本框当选中其中的复选框时相应的文本框可以输入内容,不选时不能输入内容,请大家帮忙
------解决方案--------------------
试试参考。
<table width= "100% " border= "1 ">
<tr>
<td colspan= "4 " nowrap= "nowrap "> <input type= "checkbox " id=n name= "IS_CASH " checked onClick= "IS_CASH_Click(this.checked) " value=y>
现金方式 </td>
</tr>
<tr>
<td nowrap= "nowrap "> 财务凭证号 </td>
<td> <input size=26 TYPE= "text " name= "CASH_VOUCHER " id=a5> </td>
<td nowrap= "nowrap "> <%if DEBT_TYPE=0 then%> 已提取的减值准备 <%end if%> </td>
<td> <%if DEBT_TYPE=0 then%> <input size=26 TYPE= "text " name= "CASH_DEC_AMOUT " > <%end if%> </td>
</tr>
<tr>
<td colspan= "4 " nowrap= "nowrap "> <input type= "checkbox " id=n name= "IS_CASH " checked onClick= "aa() " value=y> 达到方式 </td>
</tr>
---------------------------------------------------
<tr>
<td nowrap= "nowrap "> 财务 </td>
<td> <input size=26 TYPE= "text " name= "CASH " id=a5> </td>
<td nowrap= "nowrap "> <%if DEBT_TYPE=0 then%> 准备 <%end if%> </td>
<td> <%if DEBT_TYPE=0 then%> <input size=26 TYPE= "text " name= "CASH_DEC " > <%end if%> </td>
</tr>
</table>
<script language= "javascript ">
function IS_CASH_Click(checked){
alert(checked);
if (checked==true){
document.all.CASH_VOUCHER.disabled=false;
document.all.CASH_DEC_AMOUT.disabled=false;
}
else{
document.all.CASH_VOUCHER.disabled=true;