Javascript JQuery移动对话框页面不工作
在我的代码对话框页面中,后退按钮不起作用。我正确地包含了jquery.mobile-1.4.4.min.css、jquery.js和jquery.mobile-1.4.4.min.js链接我的两个页面。 谁能告诉我我做错了什么 My index.htmlJavascript JQuery移动对话框页面不工作,javascript,android,jquery,cordova,Javascript,Android,Jquery,Cordova,在我的代码对话框页面中,后退按钮不起作用。我正确地包含了jquery.mobile-1.4.4.min.css、jquery.js和jquery.mobile-1.4.4.min.js链接我的两个页面。 谁能告诉我我做错了什么 My index.html <!-- page 1--> < div data-role="page" id="home" data-theme='b' data-dom-cache="true"> < div data-role="h
<!-- page 1-->
< div data-role="page" id="home" data-theme='b' data-dom-cache="true">
< div data-role="header" data-theme='a'>
< h1>My first Jquery</h1>
< /div>
< div data-role="content">
< a href="page2.html" data-role="button">Take Me to Page 2</a>
< a href="page2.html" data-role="button">Take Me to Page 2</a>
< a href="#dialog" data-role="button">dialog</a>
< /div>
< div data-role="footer" data-theme='a' data-position="fixed">
< h1>All Right Reserved</h1>
< /div>
< /div>
<!-- dialog-->
< div id="dialog" data-role="dialog" >
< div data-role="header" data-theme='a'>
< h1>header pf dialog</h1>
< /div>
< div data-role="content">
< a href="#" data-role="button">Back</a>
< /div>
< div data-role="footer" data-theme='a' data-position="fixed">
< h1>All Right Reserved</h1>
< /div>
< /div>
这是我的page2.html
< div data-role="page" id="home" data-theme='a'>
< div data-role="header" data-theme='a'>
< h1>My first Jquery</h1>
< /div>
< div data-role="content">
< a href="#" data-role="button" data-rel="back" data-theme="b">Go Back</a>
< a href="#dialog" data-role="button">dialog</a>
< /div>
< div data-role="footer" data-theme='a' data-position="fixed">
< h1>All Right Reserved</h1>
< /div>
< /div>
我的第一个Jquery
返回
对话框
保留所有权利
您需要为返回按钮添加数据rel=“back”
像这样试试
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.js"></script>
<!-- page 1-->
<div data-role="page" id="home" data-theme='b' data-dom-cache="true">
<div data-role="header" data-theme='a'>
<h1>My first Jquery</h1>
</div>
<div data-role="content"> <a href="page2.html" data-role="button">Take Me to Page 2</a>
<a href="page2.html" data-role="button">Take Me to Page 2</a>
<a href="#dialog" data-role="button">dialog</a>
</div>
<div data-role="footer" data-theme='a' data-position="fixed">
<h1>All Right Reserved</h1>
</div>
</div>
<!-- dialog-->
<div id="dialog" data-role="dialog">
<div data-role="header" data-theme='a'>
<h1>header pf dialog</h1>
</div>
<div data-role="content"> <a href="#" data-role="button" data-rel="back">Back</a>
</div>
<div data-role="footer" data-theme='a' data-position="fixed">
<h1>All Right Reserved</h1>
</div>
</div>
我的第一个Jquery
保留所有权利
标题pf对话框
保留所有权利
参考此检查此@aravin谢谢+1.