+ -
当前位置:首页 → 问答吧 → 表单提交后插入数据库成功跳转到另一页面

表单提交后插入数据库成功跳转到另一页面

时间:2011-12-08

来源:互联网

在a.html页面的from表单提交后在数据库中插入成功跳到b.html失败跳到c.html怎么做到呢。做这个主要是想防止页面提交后再刷新加入数据库的情况。

作者: qilifang343   发布时间: 2011-12-08

返回脚本,用 location.replace 转地址, 不产生历史记录
HTML code
<script>
window.onload=function(){
   location.replace("b.html");
}
</script>

作者: hookee   发布时间: 2011-12-08

<script>
window.onload=function(){
  location.replace("b.html");
}
</script>

本文转自:http://www.23dnfwg.com/

作者: qw8212718   发布时间: 2011-12-08