你的问题没看太清楚,简单写了一下,不知道是不是你想要得。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function a(ctl,i)
{
if (ctl.checked)
{
document.all("1")[i].disabled = false;
}
else
{
document.all("1")[i].disabled = true;
}
}
//-->
</SCRIPT>
</head><body>
<table width="100%" border="0">
  <tr>
    <td width="54%"><input type="text" name="textfield" id="1" disabled></td>
    <td width="46%"><input type="checkbox" name="checkbox" value="checkbox" id="2" onclick="a(this,0)"></td>
  </tr>
  <tr>
    <td width="54%"><input type="text" name="textfield" id="1" disabled></td>
    <td width="46%"><input type="checkbox" name="checkbox" value="checkbox" id="2" onclick="a(this,1)"></td>
  </tr>
  <tr>
    <td width="54%"><input type="text" name="textfield" id="1" disabled></td>
    <td width="46%"><input type="checkbox" name="checkbox" value="checkbox" id="2" onclick="a(this,2)"></td>
  </tr>
  <tr>
    <td width="54%"><input type="text" name="textfield" id="1" disabled></td>
    <td width="46%"><input type="checkbox" name="checkbox" value="checkbox" id="2" onclick="a(this,3)"></td>
  </tr>
</table>
</body>
</html>

解决方案 »

  1.   

    基本是这样,只是在调用的时候文本框和复选框的个数是动态改变的,请eva再帮帮忙
      

  2.   

    你先判断一下幅选筐是否被选中,如果选中document.forms[0].obj.style.display='none',else document.forms[0].obj.style.display='';
      

  3.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>&Icirc;&THORN;±ê&Igrave;&acirc;&Icirc;&Auml;&micro;&micro;</title>
    </head><body>
    <table width="100%" border="0">
      <tr>
        <td width="54%"><input type="text" name="textfield" id="1"></td>
        <td width="46%"><input type="checkbox" name="checkbox" value="0" id="2" onclick="c(this)"></td>
      </tr>
      <tr>
        <td width="54%"><input type="text" name="textfield" id="1"></td>
        <td width="46%"><input type="checkbox" name="checkbox" value="1" id="2" onclick="c(this)"></td>
      </tr>
      <tr>
        <td width="54%"><input type="text" name="textfield" id="1"></td>
        <td width="46%"><input type="checkbox" name="checkbox" value="2" id="2" onclick="c(this)"></td>
      </tr>
      <tr>
        <td width="54%"><input type="text" name="textfield" id="1"></td>
        <td width="46%"><input type="checkbox" name="checkbox" value="3" id="2" onclick="c(this)"></td>
      </tr>
    </table>
    </body>
    </html>
    <script>
    function c( input )
    {
    var tElement = document.getElementsByName("textfield")[parseInt(input.value,10)];
    ( tElement.disabled ? tElement.disabled = false : tElement.disabled = true )
    }
    </script>