<input type="radio" name="test" onclick="r2.style.display='none';r1.style.display=''" checked><input id="r1">
<br>
<input type="radio" name="test" onclick="r1.style.display='none';r2.style.display=''"><input id="r2" style="display:none">

解决方案 »

  1.   

    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>New Page 1</title>
    <script>
    function CheckText(radioButton){
      if(radioButton == document.all.R1[0]){
        document.all.T1.style.display = "none";
        document.all.T2.style.display = "";}
      else
      {
        document.all.T1.style.display = "";
        document.all.T2.style.display = "none";}
    }
    </script>
    </head><body>  <p><input name="T1" size="20" style="display:none" value = "1">
    <input name="T2" size="20" style="display:none" value = "2"></p>
      <input type="radio" value="V1" name="R1" onclick = "CheckText(this)">
      <input type="radio" value="V2" checked name="R1" onclick = "CheckText(this)"> 
    </body></html>