点击提交按钮后显示loading,防止用户重复提交
<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>