javascript - Loop the array and fill value in dynamic textbox in jquery -
here splitvalues contains array , .split class in multiline texbox generated dynamically want fill textbox array. have done not getting further?
function insertitems(splitvalues) { $(".split").each(function () { if (splitvalues != "") { $(this).val(splitvalues);// } }); }
change this:
$(this).val(splitvalues);//
to this:
$(this).val(splitvalues.join());//
updates:
$(".split").each(function (i, elem) { $(this).val(splitvalues[i]);// });
Comments
Post a Comment