当前位置: 代码迷 >> ASP.NET >> 跳转到指定网页的底部,该怎么解决
  详细解决方案

跳转到指定网页的底部,该怎么解决

热度:2937   发布时间:2013-02-25 00:00:00.0
跳转到指定网页的底部
现在网页上的返回按钮要求返回上一页的底部。 a跳转到b的底部
我在b底部加了一个
<a name="a" >
然后
a
Response.Redirect("a.aspx?#a");
可是并未回到b底部
这是为什么...


------解决方案--------------------------------------------------------
<a name="a" id="a"></a>
------解决方案--------------------------------------------------------
Response.Redirect("a.aspx?#a");
换成
 Page.ClientScript.RegisterStartupScript(Page.GetType(),"js","location.href='a.aspx#a'",true)

<a name="a" ></a>
------解决方案--------------------------------------------------------
探讨
Response.Redirect("a.aspx?#a");
换成
Page.ClientScript.RegisterStartupScript(Page.GetType(),"js","location.href='a.aspx#a'",true)

<a name="a" ></a>
  相关解决方案