Enter key in textarea
问题 I have a textarea , On every Enter key pressed in textarea I want new line to be started with a bullet say (*). How to go about it ? No jQuery please. I can observe for the Enter key , after that !? Should I have to get the whole value of textarea and append * to it and again fill the textarea ? 回答1: You could do something like this: <body> <textarea id="txtArea" onkeypress="onTestChange();"></textarea> <script> function onTestChange() { var key = window.event.keyCode; // If the user has