Home > Web Front-end > JS Tutorial > JS method to control page buttons not to be submitted repeatedly during background execution_javascript skills

JS method to control page buttons not to be submitted repeatedly during background execution_javascript skills

WBOY
Release: 2016-05-16 17:31:30
Original
1322 people have browsed it

In ASP.NET, if you click a button and submit it to the background for execution, and then click the button again, two situations will occur. One is that the background code is executed twice, and the other is waiting for the previous one. After the submission action is executed, the submission action is executed again. No matter which one it is, the background code will be run twice, which is undesirable in many cases.
The following code has been tested in IE and Maxthon extreme speed modes.

Copy code The code is as follows:

<%@ Page Language="C# " AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>





                                                       btn.value = "Waiting for background data update";
          btn.onclick = onDealing; Return false;
} }


div>
                                                        /form>




Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template