Reputation: 68750
How would I use jQuery to redirect the page to teh base page + some string?
Specifically, I need to set the window.href = current page without params + 'SomeString';
Upvotes: 2
Views: 6272
Reputation: 163248
Try something like this:
window.location.href = window.location.pathname + 'SomeString';
Upvotes: 6
Reputation: 3800
var loc = window.location + '';
window.href = loc.replace('(\?(.+))','') + str;
Upvotes: 0