有关刷新问题,急死我了,大家赶快来帮忙啊,谢谢!!!

我用ASP做了一个留言本,在上面输入内容,下面显示的是以往留言记录,我的问题是当你点击工具栏的刷新按钮时,下面的留言记录就会自动增加一条上一次输入的内容,应该采取怎样措施来避免这种情况呢?谢谢!!!
---------------------------------------------------------------

你可以写一个当页面重新加载时,自动刷新页面。
if session("user")<>"" then
response.write "

1<script language="javascript">location.href=location.href;</script>

"
end if
或者
if session("user")<>"" then
response.write "

1<meta content="1" http-equiv="refresh"/>

"
end if
---------------------------------------------------------------

http://expert.csdn.net/Expert/topic/1642/1642430.xml?temp=.3053553
---------------------------------------------------------------

更新数据库后:
Response.Redirect "guestbook.asp"
---------------------------------------------------------------

对,直接用response.redirect 就可以了

Published At
Categories with Web编程
Tagged with
comments powered by Disqus