大家好,我正在为不支持 ajax 的 blackberr5 开发一个应用程序。通过使用 window.location.href = "MainMenu.html";
我从一个 html 导航到另一个。现在在 MainMenu.html 文件中,我的标题为:
<div data-role="header" align="center">
<a href="#" data-rel="back" data-icon="arrow-l">Back</a>
<h1>Test.html</h1>
<a href="MainMenu.html" data-icon="grid">Menu</a>
</div>
但是当我点击后退时,它不会转到上一页。如果我使用 $.mobile.changePage('MainMenu.html');
然后后退按钮工作正常。然后对于blackberry5如何处理后退按钮。任何建议将不胜感激。
最佳答案
你试过使用history.back()
您可以在此处找到有关 jQuery Mobile 后退按钮的一些有用信息:http://jquerymobile.com/test/docs/toolbars/docs-headers.html
关于javascript - 如何在没有ajax的情况下调用上一页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11648541/