This article mainly introduces the general form verification plug-in implemented by JS. It can verify common dates, passwords, names, and provide prompt information, which is of great practical value, you can refer to the examples in this article to describe the general form verification plug-in implemented by JS. Share it with you for your reference. The details are as follows:
Here is a general JS Form Verification plug-in code. Usage: Step 1: Set the Data Type of the form item, Step 2: Verify the instance form, and describe the verification error message (the program has a built-in error prompt, you can customize the text of each verification error prompt by adding msg ).
The running effect is as follows:
The Online Demo address is as follows:
Http://demo.jb51.net/js/2015/js-normal-table-check-plug-codes/
The Code is as follows:
Untitled documentUsageStep 1: Set the Data Type of the form item
DataType = "chinese [2, 8]"/>
Step 2: Verify the instance form