I have
<textarea name="a[]" id="a[]"></textarea>
<textarea name="a[]" id="a[]"></textarea>
<textarea name="a[]" id="a[]"></textarea>
<textarea name="a[]" id="a[]"></textarea>
and I want to get value of each textarea to array. How I do it?
I have
<textarea name="a[]" id="a[]"></textarea>
<textarea name="a[]" id="a[]"></textarea>
<textarea name="a[]" id="a[]"></textarea>
<textarea name="a[]" id="a[]"></textarea>
and I want to get value of each textarea to array. How I do it?
var values = [];
$("textarea[name=a[]]").each(function(){
var text = $(this).val();
values.push(text);
});