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

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -