I\'m looking to create a form which contains a dynamic number of input text boxes. I would like each text box to form part of an array (this would in theory make it easier f
Give each element a class and access the group using jQuery:
Field 1:
Field 2:
jQuery:
$("input.fields").each(function (index)
{
// Your code here
});
This will run the anonymous function on each input
element with a classname of "fields", with the this
keyword pointing to the current element. See http://api.jquery.com/each/ for more info.