jQuery Mobile-后退按钮 [英] jQuery Mobile - back button

查看:83
本文介绍了jQuery Mobile-后退按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jQuery Mobile 4.1开发应用程序.

I am developing the application using jQuery Mobile 4.1.

在我的应用中,我有两个html页面,例如login.html和home.html.在home.html中有3页. (),例如菜单页,搜索页,结果页.

In my app, I have two html pages like login.html and home.html. In the home.html have 3 pages. () like menupage, searchpage, resultpage.

项目流程为login.html ---> home.html.在home.html中,菜单页显示为第一页.如果我在菜单页面中选择了某个选项,它将移至搜索页面,然后移至结果页面.考虑一下,当前我在结果页面中.如果我在移动浏览器(iPhone-Safari,Android-chrome)上按后退"按钮,则它将移至login.html.

The project flow is login.html ---> home.html. In home.html, menupage is displayed as a first page. If I choose the some option in the menupage it will move to searchpage and then resultpage. consider, currently I am in the resultpage. If I press the back button on the mobile browsers (iPhone-safari, Android-chrome) then it moves to the login.html.

但是我想显示searchPage.如何解决这个问题?是否有可能做到这一点?

But I want to display the searchPage. How to solve this one? is it possible to do this?

[注意:页面应位于单个html页面(home.html)中.

[Note : The pages should be in the single html page(home.html).

推荐答案

使用锚标记上的属性data-rel="back"代替哈希导航,这将带您到上一页

use the attribute data-rel="back" on the anchor tag instead of the hash navigation, this will take you to the previous page

查看反向链接: 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆