Jquery mobile 自定义 返回按钮 data-rel="back"

data-rel="back"

第一个页面 主页面 studentmaster.html  通过下面js脚本跳转到详情页面

window.location.href="studentdetail.html";

[html] view plain copy
 
  1. <body>  
  2.     <div data-role="page" id="page">  
  3.         <div data-role="header">  
  4.             <h1>学员风采</h1>  
  5.         </div>  
  6.         <ul data-role="listview" data-inset="true" data-mini="true">  
  7.    
  8.         </ul>  
  9.         <div data-role="footer"  data-position="fixed" id="footer">  
  10.         </div>  
  11.     </div>  
  12.   </body>  

第二个页面  详细页面studentdetail.html

<a href="studentmaster.html" data-icon="back" data-ajax="false" data-rel="back">返回</a>

[html] view plain copy
 
  1. <body>  
  2.    <div data-role="page" id="page">  
  3.         <div data-role="header">  
  4.             <href="studentmaster.html" data-icon="back" data-ajax="false" data-rel="back">返回</a>  
  5.             <h1></h1>  
  6.         </div>  
  7.         <div data-role="content">  
  8.               
  9.         </div>  
  10.     </div>  
  11.   </body>  
原文地址:https://www.cnblogs.com/exmyth/p/7810754.html