var id = "index.html" var clickElement = document.getElementById(id); clickElement.addEventListener("click", function() { location.href = "https://www.yatex.org/gitbucket/SKIP/reroad-test/pages/2020-skippage/"+id; }, false);