Home > front end >  The input step validation issues
The input step validation issues

Time:09-15

Use the submit button to submit verification is normal,
But the use of the document. The form. Submit (); Is no longer a validation error, submitted directly, what reason be? How to use the code to forced implementation step to verify?

CodePudding user response:

1. Check whether the button event for validation of the
. 2. The document. The form submit () is to submit the form directly trigger events form submission, rather than the button event
3. Verify operation can be changed to form button events

CodePudding user response:

General can be understood as the document storage class, that is, the data can be retained by a command to save directly, this is a class background data, used to receive data reception, general validation at the front desk, backstage receive data without repeated verification, validation background generally associated with security, and more complex data integrity test, should be like that, do you have some understanding deviation, think hard, you will know,

CodePudding user response:

reference 1/f, BuBu high lighter reply:
1. Check whether the button event for validation of the
. 2. The document. The form submit () is to submit the form directly trigger events form submission, rather than the button event
3. Can be validated to form button event operations

How in the document. The form. Submit before (), to enforce validation step attribute of the input control?

CodePudding user response:

Can be replaced by common button, click () method, do validation in inside, submit the form again,

Also has a lot front-end framework with forms authentication function, if layui etc.,
  • Related