Javascript JQuery移动完整站点重定向
我正在尝试为移动站点做一些非常简单的事情:添加一个完整的站点重定向按钮。我的移动站点存储在m目录root/m中,而我的重定向链接指向root/index.php目录 实际按钮为:Javascript JQuery移动完整站点重定向,javascript,jquery-mobile,redirect,mobile,Javascript,Jquery Mobile,Redirect,Mobile,我正在尝试为移动站点做一些非常简单的事情:添加一个完整的站点重定向按钮。我的移动站点存储在m目录root/m中,而我的重定向链接指向root/index.php目录 实际按钮为: <a data-role="button" data-theme="a" href="http://www.mysite.com?m=desktop" data-icon="home" data-iconpos="left"> Full Site </a>
<a data-role="button" data-theme="a" href="http://www.mysite.com?m=desktop" data-icon="home" data-iconpos="left">
Full Site
</a>
然而,问题是当按下该链接时,JQuery Mobile会重新格式化index.php页面上的所有内容,并添加如下内容
<html class="ui-mobile">.
。
出于某种原因,我似乎找不到其他人对此有任何问题。
有人知道如何为某些链接禁用此功能,并为其他链接启用此功能吗
谢谢。将rel=“external”属性添加到按钮中,如下所示:
<a data-role="button" data-theme="a" href="http://www.mysite.com?m=desktop" data-icon="home" data-iconpos="left" rel="external">
Full Site
</a>
这将强制打开新url,而不将其加载到当前DOM结构中。将rel=“external”属性添加到按钮中,如下所示:
<a data-role="button" data-theme="a" href="http://www.mysite.com?m=desktop" data-icon="home" data-iconpos="left" rel="external">
Full Site
</a>
这将强制打开新url,而不将其加载到当前DOM结构中。没错。谢谢!没错。谢谢!