I am looking to write a piece of javascript that will append a parameter to the current URL and then refresh the page - how can I do this?
this should work (not tested!)
var url = window.location.href; if (url.indexOf('?') > -1){ url += '¶m=1' }else{ url += '?param=1' } window.location.href = url;
1.4m articles
1.4m replys
5 comments
57.0k users