实现这一目标的最佳方法是什么。我有一个页面加载选择:
....
<div data-role="content" style="">
<ul data-role="listview">
<li><a href="#departmentPage">Departments</a></li>
</ul>
</div>
</section>
....
<section id="departmentPage" data-role="page">
<section data-role="panel" id="departmentPageMenu" data-position="left" data-dismissible="false" data-display="overlay" style="">
<header data-role="header" id="Header2" style="">
<h1>Menu</h1>
<a href="#pressReleasePageMenu" data-role="button" data-icon="arrow-l" data-iconpos="notext" data-theme="c">Close</a>
</header>
<div data-role="content" style="">
<ul data-role="listview">
</ul>
</div>
</section>
<header data-role="header" id="departmentPageHeader">
<a style="" id="pressReleaseHome" href="#departmentPageMenu" data-role="button" data-icon="grid" data-iconpos="notext" data-theme="c">Home</a>
<h2 style=" font-size: 18px;" id="pressReleaseTitle" >Departments</h2>
</header>
<div data-role="content" id="departmentPageContent" style="">
<div id="contentData" style="color: #262626; font-size: 16px;font-family: Helvetica, Arial, sans-serif; margin-bottom: 30px; padding-left: 30px; padding-right: 30px; ">
</div>
<div style="text-align: center;">
<div style="" id="paginationContainer"></div>
</div>
</div>
</section>
将链接设为:
http://localhost/MDefault.aspx#departmentPage
此页面提取了一个部门列表,每个部门都包含在一个锚点中 防爆。 HR
但如果我选择此页面会返回初始页面而不是departmentsPage。我试过修改链接:
<a href="http://localhost/MDefault.aspx?id=1#departmentsPage">HR</a>
但没有任何反应。处理此问题的最佳方法是什么,以便链接返回departmentsPage?