在jquery mobile中没有得到正确的结果

嗨我有3个html文件

的index.html

               

现在单击按钮我调用https://stackoverflow.com/questions/11307727/not-getting-proper-result-on-back-press-in-jquery-mobile/TestMenu.html,如下所示:

       

点击按钮我打电话给https://stackoverflow.com/questions/11307727/not-getting-proper-result-on-back-press-in-jquery-mobile/PortfolioTest.html,如下所示:

       

现在当我回来按下然后前一个屏幕意味着当我再次按下https://stackoverflow.com/questions/11307727/not-getting-proper-result-on-back-press-in-jquery-mobile/TestMenu.html中的按钮时显示https://stackoverflow.com/questions/11307727/not-getting-proper-result-on-back-press-in-jquery-mobile/TestMenu.html它再次来到https://stackoverflow.com/questions/11307727/not-getting-proper-result-on-back-press-in-jquery-mobile/PortfolioTest.html uptil现在一切都很好但是现在如果我按回来而不是去https://stackoverflow.com/questions/11307727/not-getting-proper-result-on-back-press-in-jquery-mobile/TestMenu.html它直接转到index.html页面。

这就是当我使用Android 2.2版本时,如果我使用2.1版本,那么一切都很好。 这是什么解决方案? 任何帮助将不胜感激。 提前致谢。

我不知道这是否会影响您的导航,但您对每个页面使用相同的页面ID(id =“home”)。 也许你应该给页面不同的id。

$.mobile.pushStateEnabled = false; 解决我的问题。 现在它在所有版本中都能完美运行。