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

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -