这很奇怪。我有一些构建这个查询字符串的 Javascript 代码:
var str = '/attorneys/?locations[]=70&locations[]=71&attorneyname=abc';
// p.s. in the real code, it actually builds str; it's not just declared like you see here :-)
window.location.href = str;
但是,浏览器正在删除方括号并重定向到:
http://mysite.com/attorneys?locations=70&locations=71&attorneyname=abc
为什么浏览器/Javascript 会删除方括号?我怎样才能让他们坚持下去?