1. 程式人生 > >Jquery mobile 自定義 返回按鈕 data-rel="back"

Jquery mobile 自定義 返回按鈕 data-rel="back"

pla ole view student ajax ati source -i alt

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. </ul>
  8. <div data-role="footer" data-position="fixed" id="footer">
  9. </div>
  10. </div>
  11. </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. <a href="studentmaster.html" data-icon="back" data-ajax="false" data-rel="back">返回</a>
  5. <h1></h1>
  6. </div>
  7. <div data-role="content">
  8. </div>
  9. </div>
  10. </body>

Jquery mobile 自定義 返回按鈕 data-rel="back"