Trim leading/trailing whitespace from textarea using jQuery?
问题 Following code is an example of text placed into a textarea from a database. <textarea id="inputPane" cols="80" rows="40" class="pane"> <p> some text here... </p> <p> more text here... </p> </textarea> using jQuery's .trim what is the actual jquery code to remove all leading and trailing whitespace and have the textarea display very similar to below? <textarea id="inputPane" cols="80" rows="40" class="pane"> <p>some text here...</p> <p>more text here...</p> </textarea> I've worked on this for