You should be familiar with the function of the ENTER key, for example, in many Windows applications, you can enter this program or turn on a function by clicking Enter, but sometimes we want to block its function, for example, when filling out a form, you may accidentally click the ENTER key to cause the form to submit incorrectly, Here's a quick introduction to how to implement this feature. The code example is as follows:
How to Prevent carriage return (enter) key submission form, in fact very simple, on the one word. Onkeydown= "if (event.keycode==13) return false;" It would be nice to write this sentence in the from tag.
The above code can mask the function of submitting the form by clicking Return. The code is easy to understand, there is no clear welcome to put forward valuable comments, thank you all have been the cloud-Habitat community website support.