ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Start new line when Enter key pressed in Multiline TextBox (TextArea) using JavaScript and jQuery<p>Hey&nbsp;<a class="username" rel="micah">micah,</a></p> <p>Please use keyup instead of keypress, refer below sample.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <div class="demo_block"> <pre class="brush: html">&lt;script type=&#34;text/javascript&#34; src=&#34;https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34;&gt; $(function () { $(&#34;[id*=Textpost]&#34;).on(&#34;keyup&#34;, function (e) { if (e.which != 13) { var textarea = $(this)[0]; textarea.oninput = function () { textarea.style.height = &#34;&#34;; textarea.style.height = Math.min(textarea.scrollHeight, 582) + &#34;px&#34;; }; } else { e.preventDefault(); } }); }); &lt;/script&gt; &lt;div&gt; &lt;textarea name=&#34;Textpost&#34; rows=&#34;1&#34; cols=&#34;20&#34; id=&#34;Textpost&#34; class=&#34;form-control&#34; placeholder=&#34;Thoughts...&#34; cols=&#34;20&#34; autofocus=&#34;autofocus&#34; style=&#34;border-color:#8CC6FF;border-width:1px;border-style:Solid;font-weight:normal;width:100%;&#34;&gt; &lt;/textarea&gt; &lt;/div&gt;</pre> </div> <p><a class="demo button orange btn btn-red">Demo</a></p>https://www.aspforums.net:443/Threads/193964/Start-new-line-when-Enter-key-pressed-in-Multiline-TextBox-TextArea-using-JavaScript-and-jQuery/https://www.aspforums.net:443/Threads/193964/Start-new-line-when-Enter-key-pressed-in-Multiline-TextBox-TextArea-using-JavaScript-and-jQuery/Mon, 17 Dec 2018 05:09:07 GMT