如何在没有 AJAX 的情况下调用上一页

how to call previous page without ajax

本文关键字:情况下 调用 一页 AJAX      更新时间:2024-02-05

大家好,我正在为Blackberr5开发一个不支持ajax的应用程序。通过使用window.location.href = "MainMenu.html";我正在从一个 html 导航到另一个 html。现在在主菜单中.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');那么后退按钮工作正常。然后对于黑莓5如何处理后退按钮。任何建议将不胜感激。

你试过使用history.back()

您可以在此处找到有关jQuery mobile中后退按钮的一些有用信息:http://jquerymobile.com/test/docs/toolbars/docs-headers.html

尝试以下两个之一

history.back(( 或 history.go(-1(

希望它会起作用