jquery - Check whether specific radio button is checked -
I am trying to return and if it has been selected or not
I have tried many things but I can not find it right:
& lt ; Input type = "radio" runat = "server" name = "testgroup" id = "test1" /> gt; & Lt; Label = "& lt;% = test1 .clientID%>" style = "cursor: hand" runat = "server" & gt; Test 1 & lt; / Labels & gt; & Lt; Input type = "radio" runat = "server" name = "testGroup" id = "test2" /> gt; & Lt; For label = "& lt;% = test2.ClientID%> & gt;" Style = "cursor: hand" run = "server" & gt; Test 2 & lt; / Labels & gt; & Lt; Input type = "radio" runat = "server" name = "testGroup" id = "test3" /> & Lt; == & quot;% = test3.ClientID% & gt; Label for; Style = "cursor: hand" & gt; Test3 & lt; / Labels & gt;
And in my method I have this:
return $ ("input [name = 'test2']:" check "); < / Code>
me being undefined on $ ("input [@ name = 'test2']: checked");
Renewed:
Example:
type = "radio" runat = "server" name = "radio group" id = "paypal reed button" value = " Paypal "/> This return is still 'undefined': $ (" input [@ name = radio group]: check Done "). Attr ('paypalradiobutton');
If I try this, then I get 'False', even if I select the radio button:
$ ('input: radio [name = radio group]: check'). Val () == 'PayPalSocked' / Code>
Select your selector 't input field, and if this happens then this one The jQuery object will return. Try this:
$ ('# test2'). (': Check');
Comments
Post a Comment