ASP.NET中返回上页为什么不能实现呢??请赐教,谢谢!

来源:百度知道 编辑:UC知道 时间:2024/06/19 01:36:16
我先用Response.Write("<script>alert('Hellow...');history.back();</script>");不能实现,
但是我再用Button1.Attributes.Add("onclick","history.back(1);return false;");也不能实现,请问是怎么回事呢,谢谢。
为了达到万无一失,请先试验下再做结论,谢谢!

Response.Write("<script>alert('Hellow...');history.back();</script>");不能实现,可以试试Response.Write("<script>alert('Hellow...');location.href='...';</script>");

如果按钮提交,最好把事件写到onClientClick=''

Response.Write("<script>alert('Hellow...');history.go(-1);</script>");这个试试

<A href="javascript: window.history.back();"></A>

写错了吧,后退一步的函数是:history.go(-1)

楼主,我也不知道..