Answers for "append to url javascript"

0

append to url javascript

var url = window.location.href;    
if (url.indexOf('?') > -1){
   url += '&param=1'
}else{
   url += '?param=1'
}
window.location.href = url;
Posted by: Guest on September-16-2021

Code answers related to "append to url javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language