Get started with JQuery mobile-Set Back button text (GO)

Source: Internet
Author: User

Http://www.tuicool.com/articles/AZnYVz

Get started with JQuery mobile-set Back button texttime 2013-01-09 20:24:28 csdn Blog original http://blog.csdn.net/liang408015204/article/details/8487201

1. To add a Back button to the page container header, simply add the Data-add-back-btn property to the page container and set the property value to True. Display defaults to back, you can modify the value of the Data-back-btn-text property to set the text that appears in the Rewind button.

2. Sample code:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >

<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<meta name= "viewport" content= "width=device-width,initial-scale=1"/>
<link href= "Css/jquery.mobile-1.2.0.min.css" rel= "Stylesheet" type= "Text/css"/>
<script src= "js/jquery-1.8.3.min.js" type "Text/javascript" ></script>
<script src= "Js/jquery.mobile-1.2.0.min.js" type= "Text/javascript" ></script>
<script type= "Text/javascript" >
$ (function () {
$.mobile.page.prototype.options.backbtntext= "Back";

</script>
</HEAD>
<BODY>
<div data-role= "page" id= "E1" data-add-back-btn= "true" >
<div data-role= "header" ><div data-role= "Content" ><a href= "#e2" > Next </a></div>
<div data-role= "Footer" ></div>
<div data-role= "page" id= "E2" data-add-back-btn= "true" >
<div data-role= "header" ><div data-role= "Content" ><a href= "#e3" > End </a></div>
<div data-role= "Footer" ></div>
<div data-role= "page" id= "E3" Data-add-back-btn= "true" data-back-btn-text= "Home" >
<div data-role= "header" ><div data-role= "Content" ><a href= "#e1" > Home </a></div>
<div data-role= "Footer" ></div>
</BODY>

</HTML>

3. Preview:

Click Next to click the last page

Get started with JQuery mobile-Set Back button text (GO)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.