Home >Web Front-end >HTML Tutorial >About html form submission issues_html/css_WEB-ITnose

About html form submission issues_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:54:24994browse

The html form submission is handed over to the background servlet for processing. Why is the form sometimes submitted twice and sometimes only once?

html code:

servlet code:


Reply to discussion (solution)

Submit will be submitted once with one click, and will not be submitted multiple times

It will be submitted once with one click
You can use script control to prevent repeated submissions

The simplest is the button It changes to unavailable status immediately after submission.

The other one is to generate a token in the frontend and compare it during form verification.

can prevent duplicate submissions

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn