javascript - Click the submit button to check the values ​​of all inputs on the page and pop up a prompt if any one is empty
phpcn_u1582
phpcn_u1582 2017-05-19 10:17:02
0
1
478

There are originally 5 inputs in the page. Clicking the "Add button" will add a new input to the page. When clicking the Submit button and any input is empty, it cannot be submitted and an alert prompt pops up. How to do this?

phpcn_u1582
phpcn_u1582

reply all(1)
小葫芦

Use the valid plug-in, or read the data in a loop yourself. Once it is empty, alert immediately and return false, otherwise continue.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template