I got a very common question that I want to get the value of a HTML input by jQuery selector with its name and specific attribute like checked. Following is my case:
<input type="radio" name="gender" value="man" checked="checked" />
<input type="radio" name="gender" value="women"/>
I tried the following code:
var gener = $("name='gender':checked=checked").val();
But it didn't return a correct value. Hope somebody gives me help on it. Thanks.