本文介绍了浏览器前进和后退无法在Javascript中正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
场景: 我在ASP.NET中有一个基于Web的应用程序.在其中,我实现了与浏览器相同的后退和前进功能. 问题: 一页后不起作用.表示它允许我后退/前进,但仅一页.我不想要那个.对于所有页面,它应该向后/向前. 代码:
Scenario: I have a web based application in ASP.NET. in which i have implement Back and Forward functionality same like browser. Problem: It''s not working after one page. means it allows me to go back/foward but for only one page. i don''t want that. it should go backward/forward for all pages. Code:
<asp:ImageButton ID="btnBack" runat="server" ImageUrl="Back_PNG.png" OnClientClick="history.back()" /> <asp:ImageButton ID="btnForward" runat="server" ImageUrl="Forward_PNG.png" OnClientClick="history.forward()" />我应该怎么办 ?有帮助吗? 在此先感谢.
What should i do ? any help ? Thanks in advance.
推荐答案使用HTML按钮代替 asp:ImageButton ,它支持 history.back()和 history.forward() use HTML button instead asp:ImageButton it supports history.back() and history.forward()
更多推荐
浏览器前进和后退无法在Javascript中正常工作
发布评论