jQuery Mobile:如何使用参数打开URL哈希? [英] jQuery Mobile: how to open url hash with parameter?

查看:159
本文介绍了jQuery Mobile:如何使用参数打开URL哈希?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 jQuery Mobile 1.2.0

I'm using jQuery Mobile 1.2.0

使用参数打开哈希是不可能的.
作品- http://jquerymobile.com/demos/1.2 .0/docs/pages/multipage-template.html#two
http://jquerymobile .com/demos/1.2.0/docs/pages/multipage-template.html#two?id = 33

It's impossible to open hash with parameter.
Works - http://jquerymobile.com/demos/1.2.0/docs/pages/multipage-template.html#two
Doesn't work http://jquerymobile.com/demos/1.2.0/docs/pages/multipage-template.html#two?id=33

推荐答案

不正式支持它,但是有解决方法.在 docs 中,您可以阅读更多有关此内容的信息(搜索用于在已知限制下传递参数.

It's not supported officialy, but there are workarounds. In the docs you can read more abot this (search for passing parameters under known limitations).

报价:

jQuery Mobile不支持将查询参数传递给 内部/嵌入式页面,但是您可以添加两个插件 您的项目支持此功能.有一个轻量级的页面 参数 插件 以及功能更全面的 jQuery Mobile路由器 插件以供使用 使用ribs.js或spine.js.一个更新的插件叫做 routerlite 不断 它仅需四个方法即可实现简单:routeinit,routechange,pageinit和 页面更改.

jQuery Mobile does not support query parameter passing to internal/embedded pages but there are two plugins that you can add to your project to support this feature. There is a lightweight page params plugin and a more fully featured jQuery Mobile router plugin for use with backbone.js or spine.js. A newer plugin called routerlite keeps it simple with just four methods: routeinit, routechange, pageinit and pagechange.

这篇关于jQuery Mobile:如何使用参数打开URL哈希?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆