<INPUT type="radio" value="0" name="r1" onclick="document.all.haha.style.display='';"> 是 
<INPUT type="radio" value="1" name="r2" onclick="document.all.haha.style.display='none';">   否 
<INPUT type="text" name="haha">

解决方案 »

  1.   

    radioButton 名字要一样啊 不一样的话就会发生都选中的情况了<INPUT type="radio" value="0" name="r1" onclick="document.all.haha.style.display='';"> 是 
    <INPUT type="radio" value="1" name="r1" onclick="document.all.haha.style.display='none';" 车checked>   否 
    <INPUT type="text" name="haha" style="display:none">
      

  2.   

    radioButton 名字不一样的话 有点麻烦 <script>
    function doHidden(objRadioButton)
    document.all.haha.style.display=(objRadioButton.value==0)?'':none'';
    </script><INPUT type="radio" value="0" name="r1" onclick="doHidden(this)"> 是 
    <INPUT type="radio" value="1" name="r2"  onclick="doHidden(this)">  否 <INPUT type="text" name="haha">
      

  3.   

    谢谢你,比如要显示三个文本框呢?是用<div>标签将他们组合吗?怎么用?
    不好意思,初学Javascript
      

  4.   

    可以<div id=haha html style="dispaly:none">
    <input>
    <input>
    <input>
    <input>
    </div>
      

  5.   


    <INPUT type="radio" value="0" name="r1" onclick="if(this.checked)div.style.display=''"> 是 
    <INPUT type="radio" value="1" name="r1" onclick="if(this.checked)div.style.display='none'"> 否
    <div style="display:none" id='div'>
    <input type=text><br>
    <input type=text><br>
    <input type=text>
    </div>