Try this.
var lines = $('textarea').val().split('\n');
for(var i = 0;i < lines.length;i++){
//code here using lines[i] which will give you each line
}
More Related Contents:
- Rendering HTML inside textarea
- How do you get the cursor position in a textarea?
- Limit number of lines in textarea and Display line count using jQuery
- Count textarea characters
- CSS Textarea that expands as you type text [duplicate]
- Get value from text area [duplicate]
- Reloading a single div in an html page [closed]
- jQuery doesn’t give a proper output, but gives these [closed]
- fixing slider on my website [closed]
- Stop form refreshing page on submit
- contenteditable change events
- Avoid dropdown menu close on click inside
- How to properly use jsPDF library
- How to get the element clicked (for the whole document)?
- How to clear the contents of an iFrame from another iFrame
- Prevent form redirect OR refresh on submit?
- TypeError: p.easing[this.easing] is not a function
- Hide scrollbar while still being able to scroll with mouse/keyboard [duplicate]
- JavaScript – head, body or jQuery?
- jQuery: get data attribute
- Creating a select box with a search option
- Simulate drop file event
- Jquery Event Not Triggering for DOM Elements Created after page load [duplicate]
- Proper way to reset a GIF animation with display:none on Chrome
- How do I capture a key press (or keydown) event on a div element?
- How can I prevent a click on a ‘#’ link from jumping to top of page?
- Passing JSON data from php to html-data attribute and then to Javascript
- iframe Auto Adjust Height as content changes
- How can I dynamically highlight strings on a web page?
- Convert JavaScript variable value to csv file