想根据被选中的不同然后跳转到不同的页面。
求指点,谢谢

解决方案 »

  1.   

    javascript或者jquery,绑定change或者click事件,在回调中获取,如&("#myradio").bind("click", function(){var sel = $this.val();//然后根据sel的不同用ajax请求不同页面});
      

  2.   

    <script type="text/javascript">
    document.getElementById('jump').onclick=function(){
    var inputs = document.getElementsByTagName('input');
    var len = inputs.length;
    for(i = 0; i < len; i++) {
    if(inputs[i].name='url' && inputs[i].checked) {
    window.location.href = 'http://www.'+inputs[i].value;
    return false;
    }
    }
    } // jquery 的写法 
    // $('#jump').click(function(){
    //
    // $('input[name="url"]').each(function(){
    //
    // if(this.checked) {
    // window.location.href = 'http://www.'+this.value;
    // return false;
    // }
    //
    // });
    // });

    </script>
      

  3.   


    <input type="radio" name="url" value="baidu.com">baidu
    <input type="radio" name="url" value="google.com">google
    <input type="radio" name="url" value="qq.com">qq
    <br/><br/><input type="button" id="jump" value="jump">
      

  4.   

    独自流浪:
    document.getElementsByName('url') 然后循环检查就可以了, tagname:input 一般是检测整个表单的
      

  5.   


    对于ie来说,getElementsByName这个函数搜索的是元素中的id属性!
    对于ff来说,getElementsByName这个函数搜索的是元素中的name属性!
      

  6.   

    你是要用php获取选中的单选按钮组的值是吗?
      var_dump($_POST['url']);
      

  7.   


    N年没升级过ie了,现在ie改规则了?我记得以前这样写ie/ff都通过的……ie6时代