我已经完成了类似的操作。如何使复选框在多种情况下启用和禁用文本框
<html>
<head>
<script type="text/javascript">
<!--
function toggleTB(what){
if(what.checked){document.theForm.theTB.disabled=1}
else{document.theForm.theTB.disabled=0}}
//-->
</script>
</head>
<body>
<form name="theForm">
<input type="checkbox" name="theCB" onClick="toggleTB(this)">Toggle The Text Box<br>
<input type="text" name="theTB" value="asdf">
</form>
</body>
</html>
但这仅用于一个再寄一次重复需要这个功能在其他行也让我怎么能使用此功能多次。
我的形式是这样的:
<tr>
<td style="border-top:none; text-decoration:underline;" >Specific operations/procedures</td>
<td>
<input type="checkbox" name="sd3[]" value="mfi_nam9" />Other(please specify):
<input type="text" name="mfi_nam9" class="text required" id="mfi_name"
</td>
</tr>
<tr>
<td style="border-top:none; text-decoration:underline;" >General principles/strategies</td>
<td>
<input type="checkbox" name="sd2[]" value="mfi_nam8" />Other(please specify):
<input type="text" name="mfi_nam8" class="text required" id="mfi_name"
</td>
</tr>
我将等待乌拉圭回合的反应,我非常感谢u人帮助我以前并希望你能帮助我这个时间太长。
我喜欢这个,但是当我使用jquery-1.5时,我的设计受到影响。那么该怎么做,除了jQuery之外,还有其他解决方案吗? – Nyaro 2011-03-10 09:13:39