<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
$(document).on("pagebeforehide","#pagetwo",function(event,data){
alert(data.nextPage.attr("id") +" 将要展示");
$(document).on("pagebeforehide","#pagetwo",function(){
<div data-role="page" id="pageone">
<div data-role="content">
<a href="#pagetwo">跳转到页面二</a>
<div data-role="page" id="pagetwo">
<div data-role="content">
<a href="#pageone">跳转到页面一</a>