<html><head>
<script Language='JavaScript'>
function formsubmit() {
Today = new Date();
var NowHour = Today.getHours();
var NowMinute = Today.getMinutes();
var NowSecond = Today.getSeconds();
var mysec = (NowHour*3600)+(NowMinute*60)+NowSecond;
if((mysec-document.formsubmitf.mypretime.value)>600) {
//600是一个时间值
document.formsubmitf.mypretime.value=mysec;
} else {
alert(' 请勿重复提交!请耐心等待!谢谢合作!');
return false; }
document.forms.formsubmitf.submit();
}
</script>
</head>
<body>
<BODY BGCOLOR="#FFFFFF">
<center><font color=red size=5>javascript防止表单重复提交</font></center>
<form name=formsubmitf id ="the" method="post" action="receiveresubmit.jsp">
<input type=hidden name='mypretime' value='0'>
<table width="459" height="266" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="F7FCFE"><div align="left"></div></td>
<td bgcolor="F7FCFE" class="s"> </td>
<td height="18" bgcolor="F7FCFE"><div align="center"> </div></td>
<td bgcolor="F7FCFE"> </td>
<td height="18" bgcolor="F7FCFE"> </td>
</tr>
<tr>
<td bgcolor="F7FCFE"> </td>
<td bgcolor="F7FCFE" class="s">用户名:<font color="#FF0000" >*</font></td>
<td height="18" bgcolor="F7FCFE"><div align="center">
<input name="user_nickname" type="text" size="20">
</div></td>
<td bgcolor="F7FCFE" class="s"> </td>
<td height="18" bgcolor="F7FCFE"> </td>
</tr>
<tr>
<td width="80" height="18" bgcolor="F7FCFE"> </td>
<td width="90" height="18" bgcolor="F7FCFE" class="s"><div align="left">密
码: <font color="#FF0000" >*</font></div></td>
<td width="180" height="18" bgcolor="F7FCFE"><div align="center">
<input name="user_psw" type="password" size="20">
</div></td>
<td width="100" height="18" bgcolor="F7FCFE" class="s">(不能少于4位)</td>
<td bgcolor="F7FCFE"> </td>
</tr>
<tr>
<td height="18" bgcolor="F7FCFE"> </td>
<td height="18" bgcolor="F7FCFE" class="s">重填密码:<font color="#FF0000" >*</font>
</td>
<td height="18" bgcolor="F7FCFE"><div align="center">
<input name="user_psw1" type="password" size="20">
</div></td>
<td height="18" bgcolor="F7FCFE"> </td>
<td bgcolor="F7FCFE"> </td>
</tr>
<tr>
<td bgcolor="F7FCFE"> </td>
<td bgcolor="F7FCFE" class="s">电话:</td>
<td height="18" bgcolor="F7FCFE"><div align="center">
<input name="user_phone" type="text" size="20">
</div></td>
<td bgcolor="F7FCFE"> </td>
<td bgcolor="F7FCFE"> </td>
</tr>
</table>
<center>
<input type="button" value="写好了" name="button1" class="4round" onclick='formsubmit()'>
<font class="red">(请按一次,耐心等待!)</font>
<input type="reset" value="重 写" name="button2" class="4round">
</center>
</form>
</body>
</html>
<script Language='JavaScript'>
function formsubmit() {
Today = new Date();
var NowHour = Today.getHours();
var NowMinute = Today.getMinutes();
var NowSecond = Today.getSeconds();
var mysec = (NowHour*3600)+(NowMinute*60)+NowSecond;
if((mysec-document.formsubmitf.mypretime.value)>600) {
//600是一个时间值
document.formsubmitf.mypretime.value=mysec;
} else {
alert(' 请勿重复提交!请耐心等待!谢谢合作!');
return false; }
document.forms.formsubmitf.submit();
}
</script>
</head>
<body>
<BODY BGCOLOR="#FFFFFF">
<center><font color=red size=5>javascript防止表单重复提交</font></center>
<form name=formsubmitf id ="the" method="post" action="receiveresubmit.jsp">
<input type=hidden name='mypretime' value='0'>
<table width="459" height="266" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="F7FCFE"><div align="left"></div></td>
<td bgcolor="F7FCFE" class="s"> </td>
<td height="18" bgcolor="F7FCFE"><div align="center"> </div></td>
<td bgcolor="F7FCFE"> </td>
<td height="18" bgcolor="F7FCFE"> </td>
</tr>
<tr>
<td bgcolor="F7FCFE"> </td>
<td bgcolor="F7FCFE" class="s">用户名:<font color="#FF0000" >*</font></td>
<td height="18" bgcolor="F7FCFE"><div align="center">
<input name="user_nickname" type="text" size="20">
</div></td>
<td bgcolor="F7FCFE" class="s"> </td>
<td height="18" bgcolor="F7FCFE"> </td>
</tr>
<tr>
<td width="80" height="18" bgcolor="F7FCFE"> </td>
<td width="90" height="18" bgcolor="F7FCFE" class="s"><div align="left">密
码: <font color="#FF0000" >*</font></div></td>
<td width="180" height="18" bgcolor="F7FCFE"><div align="center">
<input name="user_psw" type="password" size="20">
</div></td>
<td width="100" height="18" bgcolor="F7FCFE" class="s">(不能少于4位)</td>
<td bgcolor="F7FCFE"> </td>
</tr>
<tr>
<td height="18" bgcolor="F7FCFE"> </td>
<td height="18" bgcolor="F7FCFE" class="s">重填密码:<font color="#FF0000" >*</font>
</td>
<td height="18" bgcolor="F7FCFE"><div align="center">
<input name="user_psw1" type="password" size="20">
</div></td>
<td height="18" bgcolor="F7FCFE"> </td>
<td bgcolor="F7FCFE"> </td>
</tr>
<tr>
<td bgcolor="F7FCFE"> </td>
<td bgcolor="F7FCFE" class="s">电话:</td>
<td height="18" bgcolor="F7FCFE"><div align="center">
<input name="user_phone" type="text" size="20">
</div></td>
<td bgcolor="F7FCFE"> </td>
<td bgcolor="F7FCFE"> </td>
</tr>
</table>
<center>
<input type="button" value="写好了" name="button1" class="4round" onclick='formsubmit()'>
<font class="red">(请按一次,耐心等待!)</font>
<input type="reset" value="重 写" name="button2" class="4round">
</center>
</form>
</body>
</html>