Skip to content

Instantly share code, notes, and snippets.

@springcome
Created October 18, 2013 02:11
Show Gist options
  • Save springcome/7035452 to your computer and use it in GitHub Desktop.
Save springcome/7035452 to your computer and use it in GitHub Desktop.
radio, jquery
<input type="radio" name="rdo" value="1">1번
<input type="radio" name="rdo" value="2">2번
<input type="radio" name="rdo" value="3">3번
// checked된 값을 알고자 할때
$(':input:radio[name=rdo]:checked').val();
// checked된 text를 알고자 할때
$(':input:radio[name=rdo]:checked').text();
// value로 checked하고자 할때
$(':input:radio[name=rdo][value=1]').attr('checked', true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment