表单内容提交等待效果
一款表单效果,当用户提交的时候,会弹出一个信息提示框,让用户等待提交的完成,类似于Ajax的效果,对于想学Ajax的朋友,或许会从本示例中得到启发。
一款表单效果,当用户提交的时候,会弹出一个信息提示框,让用户等待提交的完成,类似于Ajax的效果,对于想学Ajax的朋友,或许会从本示例中得到启发。
答案:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>内容提交等待</title>
</head>
<body><script language=javascript>
<!--
function showSending() {
sending.style.visibility="visible";
}
-->
</script>
<form method="post" action=""><div id="sending" style="position:absolute; z-index:10; width: 400; visibility: hidden">
<table width=400 height=80 border=0 cellspacing=2 cellpadding=0 bgcolor="#8FA8E9">
<tr>
<td bgcolor=#eeeeee align=center>内容正在发送, 请稍候...</td>
</tr>
</table>
</div>
<table width="95%" border="1" cellspacing="0" cellpadding="1" bordercolorlight="#8FA8E9" bordercolordark="#FFFFFF">
<tr align="center">
<td height="30" class="bg3" colspan="2">
<input type='submit' name='ACTION' value='发送' onClick="showSending()">
</td>
</tr>
</table>
</form>
</body>
</html>
上一个:模拟淘宝网的多级选择菜单
下一个:jquery 文本框得到失去的焦点