![](/img/trans.png)
[英]Cordova - window.history.back() not working on HTML back button in iOS 9
[英]My device back button is not working properly it goes to first html but return back to second html
我正在借助jquery mobile(html5,javascript),cordova 3.2在android中制作一個應用程序,其中index.html中有兩個html頁面,我正在document.location.href的幫助下調用home.html但問題是是我的設備后退按鈕無法正常工作,每當我在設備上單擊我的后退按鈕時,它都無法正常工作,它會轉到index.html,但返回到home.html,如何解決這些問題,請幫幫我
index.html
<div data-role="content">
<a data-role="button" data-inline="true" id="subBtn">Submit</a>
</div>
一個.js
$("#subBtn").unbind("click").click(function() {
submitButton();
});
function submitButton(){
document.location.href = "home.html";
}
home.html
<div data-role="content">
<p>welcome to home page</p>
</div>
像這樣使用它:
window.location.href = "home.html"
使用location.href =“ yourpagename.html”
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.