JS获取问号参数然后跳转,需要什么代码?

2025-05-19 20:03:19
推荐回答(1个)
回答1:


var getStr = location.search;
setTimeout(function(){
 window.location.href = '/bbb.html'+ (getStr==''?'':getStr); 
}, 3000);
//console.log(getStr )