【发布时间】:2015-10-06 23:47:45
【问题描述】:
我对 jQuery (1.11.2) 有疑问。我必须使用查询字符串中的参数构建 URL,如下所示: http://www.myhost.com/my/path/?search=ok#/(testA)/test1a,test2a/(testB)/testb1
但是jQuery返回给我“错误:语法错误,无法识别的表达式:#/(testA)/testa1,testa2”
我的代码:
$(document).ready(function() {
var url = decodeURIComponent(document.location.href);
console.log(url);
}
我没有发现问题,对于旧版本的 jQuery,这种类型的 URL 没有任何问题(我正在使用 eZ Publish 5)。
谢谢你的回答:)。
【问题讨论】:
标签: jquery ezpublish querystringparameter