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
}
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]
- HTML-encoding lost when attribute read from input field
- jQuery Data vs Attr?
- HTML text input allow only numeric input
- Cross domain iframe issue
- Get file size, image width and height before upload
- How to load all the images from one of my folder into my web page, using Jquery/Javascript
- jQuery: Get height of hidden element in jQuery
- How to impose maxlength on textArea in HTML using JavaScript
- How to reload current page without losing any form data?
- Stop setInterval
- How to do a Jquery Callback after form submit?
- How to get the element clicked (for the whole document)?
- How to scroll to top of page with JavaScript/jQuery?
- Is there a DOM event that fires when an HTML select element is closed?
- Prevent contenteditable adding on ENTER – Chrome
- jQuery UI accordion that keeps multiple sections open?
- how to make a jquery “$.post” request synchronous [duplicate]
- How to silently hide “Image not found” icon when src source image is not found
- HTML5 Local Storage fallback solutions [closed]
- Get unique selector of element in Jquery
- Hide scrollbar while still being able to scroll with mouse/keyboard [duplicate]
- Change color of specific words in textarea
- How to find a parent with a known class in jQuery?
- HTML anchor link – href and onclick both?
- width/height after transform
- How do you detect the clearing of a “search” HTML5 input?
- scrollTop animation without jquery [duplicate]
- Populate one dropdown list based on the selection of other dropdown list
- Center flex item in container, when surrounded by other flex items
- how to disable DIV element and everything inside [duplicate]
- How do I get the content of a using jQuery?
- Possible to associate label with checkbox without using “for=id”?
- Jquery click event not firing on the element created dynamically using jquery
- Disable zoom on input focus in Android webpage
- Is there any problem with using HTML5’s “data-*” attributes for older browsers?
- Click on option event
- submit event does not fire if submit initiated programmatically
- How to get the JSON with duplicate keys completely in javascript
- Can we use the value of localStorage from other domains?
- Remove ‘All Files’ option from HTML file input
- How do I refresh a DIV content?
- ToggleClass animate jQuery?
- Set focus and cursor to end of text input field / string w. Jquery [duplicate]
- Open new window without focus on it [duplicate]