Home >Web Front-end >JS Tutorial >How to prevent a button from being clicked multiple times in a short period of time_javascript techniques

How to prevent a button from being clicked multiple times in a short period of time_javascript techniques

WBOY
WBOYOriginal
2016-05-16 16:55:592155browse

If a button can be clicked multiple times in a short period of time, it may be clicked maliciously by the user. To prevent this, you can set it to only click once within a certain period of time, and prohibit clicking the button at other times.

The code is as follows:

Copy code The code is as follows:



Js timed event



< form id="form1" runat="server">