我不知道我是否已经看到了这个权利,但使用jQuery UI的ThemeRoller当前主题设置似乎被存储在像http://www.site.com/page.html#theme-details网址...的Javascript选定的锚点
有没有办法来提取数据从这使用JavaScript?因此,我将返回类似
theme-details...
从我刚才提到
还是我听错了的网址是什么?
我不知道我是否已经看到了这个权利,但使用jQuery UI的ThemeRoller当前主题设置似乎被存储在像http://www.site.com/page.html#theme-details网址...的Javascript选定的锚点
有没有办法来提取数据从这使用JavaScript?因此,我将返回类似
theme-details...
从我刚才提到
还是我听错了的网址是什么?
如果你想在当前文档的URL的片段标识符:
location.hash
如果你想有一个字符串的它:
str.match(/^[^#]*#(.*)/)[1]
window.location.hash
将返回URL的一部分#符号后面,包括#符号。
window.location.hash.substring(1);
将返回主题的详细信息...
查看更多关于
window.location
document.location.hash.substring(1) // will return "theme-details" minus the hash