How To Extract Id Elments From Hidden Filed Using Jquery?
I have following form. From this i want id of each hidden field. How to do that. Is it possible to remove hidden element using id of hidden elements by jquery Remove methods Form
Solution 1:
var hiddenIds = [];
$('input:hidden').each( function() {
hiddenIds.push($(this).attr('id'));
});
And output is hiddenIds
array.
Solution 2:
The question is not clear, still I think the below will solve the first question
To get ids of hidden element
// hiddenIds will be an array of the element id
var hiddenIds = $('#postform input:hidden').map(function(){
return this.id
}).get();
Post a Comment for "How To Extract Id Elments From Hidden Filed Using Jquery?"