Skip to content

Instantly share code, notes, and snippets.

@silasrm
Created February 1, 2018 17:41
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 silasrm/19590bf51f3886d67a4a7f98359951af to your computer and use it in GitHub Desktop.
Save silasrm/19590bf51f3886d67a4a7f98359951af to your computer and use it in GitHub Desktop.
Get fields from form
$('#requerimentoCurriculo input, #requerimentoCurriculo select').each(
function(index){
var input = $(this);
console.log('Name: ' + input.attr('name') + ' | Type: ' + (!!input.attr('type') ? input.attr('type') : 'select') + ' | Value: ' + input.val());
}
);
$('#requerimento input, #requerimento select').each(
function(index){
var input = $(this);
console.log('Name: ' + input.attr('name') + ' | Type: ' + (!!input.attr('type') ? input.attr('type') : 'select') + ' | Value: ' + input.val());
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment