URL 到 link 到活动标签

URL to link to active tab

我正在尝试 link 到下方 URL 的“注册”选项卡,但我添加的查询字符串似乎不正确。

https://www.xpectfurniture.co.uk/my-account/

我尝试使用以下字符串,但这似乎不起作用...

?tab=注册

我哪里错了?

主题开发者使用 javascript 提供了解决方案。如果有人正在寻找类似的解决方案,可以在下面找到它:

<script>
jQuery(document).ready(function($){
function getQueryParams(qs) {
qs = qs.split("+").join(" ");
var params = {},
tokens,
re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]);
}
return params;
}
       
setTimeout(function(){
      if( $('.woocommerce-account').length > 0 ) {
var nectarGetQueryParam = getQueryParams(document.location.search);
if (typeof nectarGetQueryParam['tab'] != 'undefined' && nectarGetQueryParam['tab'] == 'register' ) {
           $('.nectar-form-controls .control:last-child').trigger('click');
        }
}
},200);
});
</script>