javascript - Text field to array -
i trying create array text field. need paste fifty lines text field. convert lines array, each line being different element in array.
given input field this:
<textarea id="myinput"></textarea>
you can value text field follows:
var myvalue = document.getelementbyid("myinput").value;
and split this
var myarray = myvalue.split("\n");
Comments
Post a Comment