<p id="instructionstext"></p>Have fun!</p>
<button onclick="onButtonClick()">I dare you to click me!</button>
JavaScript - how can I add the link for forwarding to the second html page?
function onButtonClick() {
document.getElementById('instructionstext').innerHTML = "😱";
console.log("Secret message");
}
function onButtonClick() {
document.getElementById('instructionstext').innerHTML = "😱";
console.log("Secret message");
window.location.href = "http://www.second-link.com";
}