// In my case, I used a button to activate this function: function myFunction() { window.location.href = 'index.html'; }