假如有一个单选按钮:
我一选中它之后就会立马弹出一个页面怎么做?

解决方案 »

  1.   

    纯前台代码实现,弹窗可能被阻止
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
    </head>
    <script type="text/javascript">
      function evFun()
      {
         window.open('test1.aspx',"","height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no","");
      }
    </script>
    <body>
        <form id="form1" runat="server">
        <div>
            <input id="Radio1" type="radio" onblur="evFun()" />
         
        </div>
        </form>
    </body>
    </html>
      

  2.   

    <input type="radio" name="ra" checked="checked" onclick="window.open('http://www.baidu.com')">ss
    <input type="radio" name="ra" onclick="window.open('http://www.google.cn.hk')">bb
      

  3.   

    wzx_xyz:<script language="javascript">
    function checkbox(){
    var box = document.getElementById("check");
    var div = document.getElementById("div1");
    if(box.checked){
    div.style.display="block";
    }else{
    div.style.display="none";
    }
    //alert(box);
    var radiobutton = document.getElementById("radiobut");
    if(radiobutton.checked){
    window.open("http://www.baidu.com");
    }
    }
    </script>
    <body>
    <form id="form1" name="form1" method="post" action="">
    <input type="checkbox" name="check" id="check" onClick="checkbox()"/>
    <div id="div1" style="display:none">
      <label>
    <input type="radio" name="radiobutton" value="radiobutton" id="radiobut"/>
    <input type="radio" name="radiobutton" value="radiobutton" />
      </label>
    </div>
    </form>
    </body>
    我的这段代码哪里有错呢?为什么弹不出百度页面?