Question form infinite forms submitted

The project also would have been good before, suddenly form an infinite form will be submitted, the screen will be flashing.

My approach may be more strenuous, but can be resolved, I use a ajax form to submit the form (not the students themselves Baidu ...).

1. Add onsubmit attribute in single form:

2. Starting ajax events when using ajax submit, is to click the Add button modal box:

3. The execution of the request last refresh the page on the line, although this is code written sucks, the method is soil, but I'm sure you can solve the problem of the form submitted form infinite. . . .

Guess you like

Origin www.cnblogs.com/javazyh/p/10941467.html