Home > Web Front-end > JS Tutorial > body text

JavaScript method to display loading after clicking the submit button_javascript skills

WBOY
Release: 2016-05-16 15:51:28
Original
2063 people have browsed it

The example in this article describes the method of using JavaScript to display loading after clicking the submit button. Share it with everyone for your reference. The details are as follows:

Here you can display the loading after clicking the submit button to prevent users from submitting repeatedly

<style>
#loading { 
  position:absolute; 
  width:500px; 
  height:50px; 
  top:50%;
  left:50%; 
  margin: -25px -150px;
  background-color:#FFFFFF;
  border:1px solid #CCCCCC;
  text-align:center;
  padding:20px;
}
</style>
<div id="loading" style="display:none">
<img src="image/ajax.gif" /> Loading...
</div>
<a href="#" onclick="document.getElementById('loading').style.display='';">test</a>

Copy after login

I hope this article will be helpful to everyone’s JavaScript programming design.

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