怎么防止按钮或页面重复提交 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在按纽的提交事件中加上Response.Redirect("当前页地址")或Response.Write("<script>window.location.href=wondow.location.href;</script>") 在按钮事件最后加上Response.Redirect(本网页) var tid;var bClicked = false;function sbm(){ if(bClicked){ alert("websbook.com提示您,请不要重复递交"); return false; } bClicked = true; tid = setTimeout("doit()", 10000); document.forms[0].submit();}function doit(){ if(tid!=null){clearTimeout(tid);tid=null;} bClicked = false;}</script><form action="xxx" target="hf"> <input name="btn" type="button" onclick="sbm();" value=" 提交 "></form><iframe name="hf"></iframe></body>不解释...测试通过可以用于 服务端控件 网站在更新不上去 DataSet.Tables 中如何插入值? 存储过程,判断数据局已存在 SESSION和MSSQL服务器性能问题。 在ASP.Net中两种利用CSS实现多界面的方法 CSDN的性誉值有什么用? 10/11/2005 11:17:28 AM 输出时间这样 我要改成2005-10-11 11:17:28 用那个函数啊??? capicom在asp.net中的使用问题 怎么样将图片上传后生成小图片? 异常处理的方法?怎样在公用的类文件中把错误信息返回到指定的页面中或调用的页面?(在钱)急 uniqueidentifier怎么让它自动递增 怎样用单链接打开网络EXCEL文件
var tid;
var bClicked = false;
function sbm(){
if(bClicked){
alert("websbook.com提示您,请不要重复递交");
return false;
}
bClicked = true;
tid = setTimeout("doit()", 10000);
document.forms[0].submit();
}function doit(){
if(tid!=null){clearTimeout(tid);tid=null;}
bClicked = false;
}
</script><form action="xxx" target="hf">
<input name="btn" type="button" onclick="sbm();" value=" 提交 ">
</form>
<iframe name="hf"></iframe>
</body>不解释...测试通过可以用于 服务端控件