Skip to content

Instantly share code, notes, and snippets.

@cgkio
Created September 27, 2013 17:33
Show Gist options
  • Save cgkio/6732093 to your computer and use it in GitHub Desktop.
Save cgkio/6732093 to your computer and use it in GitHub Desktop.
Dealing with form fields with jQuery
var textfield_value = $("#textfield_id").val();
var selected_radio_button = $('input:radio[name=name_of_radio_group]:checked').val();
var select_selected_value = $('#select_id :selected').val();
var checked_unchecked = $('#checkbox_id:checked').val();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment