Friends who are experienced in web development will strictly verify the forms entered by users. I would like to share with you some experience in Form Verification, how to use JavaScript to restrict the input box to only English letters and numbers, not Chinese and other special characters. For more information, see the following code!
<Html xmlns = "http://www.phpernote.com/javascript-function/742.html">
The following describes the common events of onkeypress, onkeyup, and onblur:
The onkeypress event occurs when the keyboard key is pressed and a key is released.
The onkeyup event occurs when the keyboard button is released.
The onblur event occurs when the object loses focus.
Articles you may be interested in
- Javascript restricts that only numbers (including decimal places) can be entered in the text box)
- Summary of the string truncation function implemented by javascript (including introduction to the use of Js to intercept Chinese characters)
- Js can only enter numbers and numbers with decimal points, compatible with IE and firefox
- Prohibit web page right-click, copy, save as, View Source file and other functions to implement web page source code protection
- How does php convert the br line breaks in html to line breaks in text input?
- Css controls code for force-breaking and non-wrapping in English and Chinese
- Php clears (deletes) the files in the specified directory, and does not delete the directory folder.
- PHP analyzes the file header information to determine the type of the uploaded file