remove url parameters with javascript or jquery
Hmm... Looking for better way... here it is
var onlyUrl = window.location.href.replace(window.location.search,'');
What am I missing?
Why not:
url.split('?')[0]
Hmm... Looking for better way... here it is
var onlyUrl = window.location.href.replace(window.location.search,'');
What am I missing?
Why not:
url.split('?')[0]