欲实现RadioButton点击后选中,再点击不被选中,如何实现,O(∩_∩)O谢谢,小弟初学!

解决方案 »

  1.   

    各位给点实质性的东西,checkBox我知道能用,2#你的话很中肯,不过我现在需要的是答案
      

  2.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script>
    function OnOneChanage()
    {
          if(document.getElementById("rbt_t").checked==false)
      {
         document.getElementById("rbt_t").checked=true;
      }
      else
      {
          if(document.getElementById("rbt_t").checked==true)
      {
     document.getElementById("rbt_h").checked=true;
      }
      }
      
    }</script>
    </head>
    <body>
    <input type="radio" id="rbt_t"  name="Test_rbt" value="男"   onclick="OnOneChanage()"   />
    <input type="radio" id="rbt_h"  name="Test_rbt" value="男"  Visible="false"/>
    </body>
    </html>试试,思路是这样的
      

  3.   


    <script>
    //声明全局变量保存radio的状态
    var flag = false;
    </script>
    <input type="radio" id="a1" name="Test_rbt" value="男" onclick="Javascript:flag = this.checked = !flag" />