我有一个 Jquery 移动页面,如下所示,现在我想做的是,在我的 javascript 函数中,当点击页面 A 中的链接时,我想调用页面 B,我想调用页面 B在 javascript 中仅不通过 <a href="#Page-B" >Click Me</a>
这样做
页面代码
<html>
<body>
<div data-role="page" id="Page-A">
<div data-role="content">
<a href="#" >Click Me</a>
</div>
</div>
<div data-role="page" id="Page-B">
<div data-role="content"></div>
</div>
</body>
</html>
最佳答案
您可以使用 changePage()
导航到 jQuery Mobile 中的另一个页面。
$.mobile.changePage("#Page-B", {
transition: "none" //or any other options
});
关于javascript - 在javascript中手动调用页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9605249/