For question2, my link control in pageB is <asp:HyperLink .../> , could not use onclick() event.

解决方案 »

  1.   

    Q1:
    <label><input type="radio" id="r_1" onclick="return SelectTab('tab_1');" name="srhType" value="EXACT" />Exact</label>
        <label><input type="radio" id="r_2" onclick="return SelectTab('tab_2');" name="srhType" value="ALL" />All</label>
        <script>
        var bln = true
        function SelectTab(x)
        {   
         r_1.checked=bln
         bln=!bln
        }
        </script>
    Q2:<body onload="self.focus()">
    BTW: more than radios should be the same name attribute
      

  2.   

    <script>
    var bln = true
    function SelectTab(x)
    {   
    r_1.checked=bln
    bln=!bln
    }
    </script>in the code ,i just handle the first radio ,other radio is just like the first
      

  3.   

    <label><input type="radio" id="r_1" onclick="return SelectTab('tab_1',this);" name="srhType" value="EXACT" />Exact</label>
        <label><input type="radio" id="r_2" onclick="return SelectTab('tab_2',this);" name="srhType" value="ALL" />All</label>
    <script>
    r_11 = r_21 = true
    function SelectTab(x,o)
    {   
      eval(o.id + ".checked=" + o.id + "1")
    eval(o.id + "1=!" + o.id + "1")
    }
    </script>
      

  4.   

    <label><input type="radio" id="r_1" onclick="return SelectTab('tab_1');" name="srhType" value="EXACT" />Exact</label>
        <label><input type="radio" id="r_2" onclick="return SelectTab('tab_2');" name="srhType" value="ALL" />All</label>
    <script>
    r_11 = r_21 = true
    function SelectTab(x)
    {   
      eval(event.srcElement.id + ".checked=" + event.srcElement.id + "1")
    eval(event.srcElement.id + "1=!" + event.srcElement.id + "1")
    }
    </script>
      

  5.   

    Thanks so much, net_lover(【孟子E章】) !I've tried the codes as you showed to me. Both question1 and question2 did not work.Do you have any good idea?
      

  6.   

    Q1:I can get the selected value of radio. But the radio button looks didn't be selected in page. None of the circle that shows which radio be selected is selected.Does I make sense?
      

  7.   

    I solved the first question. :)Just change onclick="return SelectTab('tab_1');" 
    to onclick="SelectTab('tab_1');" Get rid of the "return" works well.Thanks net_lover(【孟子E章】) !