Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript redirect with extra url arguments

if (window.location.search === '') {
  window.location = window.location.origin + '?arg=1'
} else {
  window.location = window.location.origin + window.location.search + '&arg=1'
}
 
PREVIOUS NEXT
Tagged: #javascript #redirect #extra #url #arguments
ADD COMMENT
Topic
Name
3+3 =