点击“搜索”按钮,在结果页显示前,显示“ 请求正在处理,请等待 ... ”。代码如下。
<div id="search_simple">
<form id="form1" name="form1" method="post" action="bestsellers.jsp"
onsubmit="showProcessingBar()">
......
<button name="submit" type="submit">Search</button>
</form>
</div>
<div id="processingbar" style="display:none">
<h3><font color="red">请求正在处理,请等待 ...</font></h3>
</div>
javascript code:
function showProcessingBar()
{
document.getElementById("search_simple").style.display = "none";
document.getElementById("processingbar").style.display = "block";
return true; // you must return true otherwise the form will not be submitted
}