Skip to content

Instantly share code, notes, and snippets.

@thejungwon
Created March 10, 2019 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thejungwon/f437edabb3ab9b5995338b27d84ef24c to your computer and use it in GitHub Desktop.
Save thejungwon/f437edabb3ab9b5995338b27d84ef24c to your computer and use it in GitHub Desktop.
//1. Get a value by id
var value = $('#test_id').val();
//2. Get a value by class
var value = $('.test_class').val();
//3. Get a value by name
var value = $('input[name=test_name]').val();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment