Wednesday, February 18, 2015

Get values of all textboxes with same name attributes in jquery

I need to get values of all textboxes with same name attributes using jquery.

<input type="text" id="text1" name="tax[]">
<input type="text" id="text2" name="tax[]">
<input type="text" id="text3" name="tax[]">




Answer :

$('input[name="tax[]"]').each(function() {
    alert($(this).val());
});

0 comments:

Post a Comment