Home >Web Front-end >JS Tutorial >JavaScript method to display loading after clicking the submit button_javascript skills
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>
I hope this article will be helpful to everyone’s JavaScript programming design.