私は2ページありindex.html
、about.html
index.html
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
... load jquery and jquery mobile...
</head>
<body>
<div data-role="page" id="index">
...content goes here...
<a href="about.html?id=1" data-role="button">about</a>
</div>
</body>
</html>
ページデータだけがありabout.html
ます-役割
<div data-role="page" id="about">
...content goes here...
</div>
問題は、リンクをクリックしてabout
ページに移動し、URL文字列を取得しようとすると、表示されることです。index.html
window.location.toString();
また
$.mobile.activePage.data('url');
両方index.html
の代わりに戻るabout.html?id=1
about.html
がインデックスページに読み込まれることは理解していますが、そのIDを取得するにはどうすればよいですか?
何か案は?
ありがとう