javascript - How to array(per line) textarea -


good morning! please body or give sample code how read text value (per line)

<body onload="displayresult()"> <table align="center"> <tr> <td> <?php $query2="select * upload1 name='xmlsample1.xml'"; $result1=mysql_query($query2); $row = mysql_fetch_array($result1); ?> <form action=""> <textarea id="validxml" rows="50" cols="100"> <?php echo $row['content']; ?> </textarea>  <br><br> <input type="button" value="verify xml" onclick="validatexml()" />  </form> </td> </tr> </table> </body> 

access value of textareaand split newline

console.log(document.getelementbyid('validxml').value.split("\n")); 

jsfiddle


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -