これはjquery mobileを使用した私の最初のWebサイトで、外部リンクに問題があります。jQuery Mobileを使用した外部リンクとハードウェア戻るボタン
私は一例を示します。
これは、ページA
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PageA</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link href="Style/Style.css" rel="stylesheet" type="text/css" />
<link href="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.js"></script>
</head>
<body>
<!-- Start of first page -->
<div data-role="page" id="pageA" data-title="Page A" data-theme="b" data-dom-cache="false">
<div data-role="header" data-theme="b">
<h1>Page A</h1>
</div>
<!-- /header -->
<div data-role="content">
<ul data-role="listview" data-theme="g">
<li><a href="PageB.htm" rel="external">PageB</a></li>
</ul>
</div>
</div>
私はリンクをクリックすると、私はページBに行きます(これまでのところ、すべてがOKです)
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Pag B</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link href="Style/Style.css" rel="stylesheet" type="text/css" />
<link href="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.js"></script>
</head>
<body>
<!-- Start of first page -->
<div data-role="page" id="pageB" data-title="Page B" data-theme="b" data-dom-cache="false">
<div data-role="header" data-theme="b">
<h1>Page B</h1>
</div>
<!-- /header -->
<div data-role="content">
<p>I am Page B!!!</p>
</div>
<!-- /content -->
<div data-role="footer" data-theme="c">
<h4>Test</h4>
</div>
<!-- /footer -->
</div>
です
私がページBにいるとき、私はハード・バックを押しますk個のAndroidモバイルデバイスでのボタンと私はページBが表示されますが、それはまた、tipicalロードのdiv上映でページAをロードし、再びページAのリンクを押す
その後パグAに戻って...
質問は?なぜこれは起こるのですか?これを行うための方法は何ですか?
I'veは、ページBでpagebeforehideイベントに解決する方法を見つけましたが、私は、これはそれを行うための方法はないと思う...
ありがとうございます!
私はこのような何かにぶつかるが、フォームを行うには持ってきました、ここで、戻る矢印は、以前の送信からフォームを保持しています。良くない。これに対する解決策はありませんか? – iJames