Ozzone Ozzone - 2 months ago 5
jQuery Question

Get all input types with name, id, value in JQuery

In JQuery, how can i get list of input type with name, id and value present in any div?

Answer

Selects inputs that descend from a div that have both name, id, and value attributes present. Then pushes the "type" attribute of each matching item into an array.

var inputTypes = [];

$('div input[name][id][value]').each(function(){
     inputTypes.push($(this).attr('type'));
});

http://api.jquery.com/multiple-attribute-selector/