1window.location = "./dir/file.html?year=" + thisYear + "&"
2 + "month=" +thisMonth + "&"
3 + "day=" +thisDay;
4// start with a . to use relative path
5// start with a / to use root
6// you can also use a URL
1if (window.location.search === '') {
2 window.location = window.location.origin + '?arg=1'
3} else {
4 window.location = window.location.origin + window.location.search + '&arg=1'
5}