<TABLE >
<TR>
<TD id=td1>testaaa</TD>
<TD id=td2>dfdfdfdfdfdf</TD>
<TD><input type=text name=cn ><input type=text name=en ><input type=radio value='test' name=dd onclick='cn.value=td1.innerText;en.value=td2.innerText'></TD>
</TR>
</TABLE>

解决方案 »

  1.   

    <script>
    function c(o){
    var tr=o.parentElement.parentElement.rowIndex
    document.all.cn.value=t.rows[tr].cells[1].innerText
    document.all.en.value=t.rows[tr].cells[2].innerText
    }
    </script>
    <table border="1" width="100" id=t>
      <tr>
        <td width="33%"><input type="radio" name=r onclick="c(this)"></td>
        <td width="33%">1</td>
        <td width="34%">2</td>
      </tr>
      <tr>
        <td width="33%"><input type="radio" name=r onclick="c(this)"></td>
        <td width="33%">3</td>
        <td width="34%">4</td>
      </tr>
    </table>
    <input name=cn><input name=en>