I've been working on a webpage and I've being trying to get a button to link to another website.
Eventually, I solved it by giving the button an id ("yellowButton") and referring to it in Javascript:
var button = document.getElementById("yellowButton");
yellowButton.addEventListener('click', gotoGamesPage, false);
function gotoGamesPage()
{
window.location = "http://www.explosionshurt.webs.com/games"
}
Doing it this way seems a bit primitive, because I'll have to do the above thing for every single button in the website. Is there any other, easier way to link a button to a different page?