<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--function radio1_onclick() {
if (radio1.checked )
{
text1.readOnly = false;
text2.readOnly = true;
}else
{
text1.readOnly = false;
text2.readOnly = false;
}
}function radio2_onclick() {
if (radio2.checked )
{
text2.readOnly = false;
text1.readOnly = true;
}else
{
text1.readOnly = false;
text2.readOnly = false;
}
}//-->
</SCRIPT>
</HEAD>
<BODY>
<table>
<tr>
<td><INPUT id=radio1 type=radio name=ra LANGUAGE=javascript onclick="return radio1_onclick()"></td><td><INPUT id=text1 name=text1 readonly ></td>
</tr>
<tr>
<td><INPUT id=radio2 type=radio name=ra LANGUAGE=javascript onclick="return radio2_onclick()"></td><td><INPUT id=text2 name=text2 readonly></td>
</tr>
</table>
</BODY>
</HTML>

解决方案 »

  1.   

    -___-<input type=radio onpropertychange="zz1.disabled=!this.checked;zz2.disabled=!this.checked;"><select id=zz1 disabled></select>
    <input id=zz2 disabled>
      

  2.   

    给radio设一个name,否则不会被选中 -_-;;
      

  3.   

    如果radio设一个name的话,那么两个radio就不会互斥了!!!就是两个都近会可以同时被选中!
      

  4.   

    选择框可以通过操作select.options(数组对像)来进行,文本框则用其value属性。
      

  5.   

    <form  enctype=  "multipart/form-data  "  >  
     <input  type=  "radio"  name=  "r1"  onclick=  "this.form.file1.disabled  =  this.checked;"  language=  "javascript">disable  <input  type=  "radio"  name=  "r1"  onclick=  "this.form.file1.disabled  =  !this.checked;" language="javascript">enable  
     <input  type="text"  name= "file1">  
     </form>