jQuery Mobile - 使用查询字符串导航“返回”

时间:2014-04-04 10:44:24

标签: jquery jquery-mobile

我遇到问题data-rel="back"没有存储其传递的url的查询字符串。查询页面最初显示正确,但在导航离开后使用"返回"导航元素,页面中断,因为重新访问的URL中存在的所有内容都是主题标签,但没有查询字符串。


查询 页面

http://localhost:4400/#details?id=100007

关联HTML:

first link attempt
<button onClick="user.menuButton();">Test User Link</button>

second link attempt
<a href="#user">Go To User</a>

通过JS链接到下一页:

document.addEventListener('menubutton', myFunction, false);

function myFunction(){
    $('body').pagecontainer('change', '#user');
}

下一页HTML:

<section data-role="page" id="user">
    <header data-role="header">
        <a href="javascript:void(0)" data-role="button" data-icon="carat-l" data-iconpos="notext" data-rel="back"></a>
        <h1>User Information</h1>
    </header>
    <section data-role="main"></section>
</section>

点击&#34;返回&#34;从下一页开始,它将返回查询&n;页面:

http://localhost:4400/#details *<-- Query string no longer exists.*

任何解决此问题的帮助&#34;返回&#34;链接问题非常感谢。

0 个答案:

没有答案
相关问题