Enter in Google
function checkUser() {
var link = document.querySelector("#kopce");
var poraka = document.querySelector("#poraka");
var konfirm = window.confirm("Do you want to go to GOOGLE");
if (konfirm) {
var godini = prompt("please inset your age");
if (godini == "") {
link.href = "#";
poraka.innerHTML = "please insert your age";
} else if (!godini) {
link.href = "#";
poraka.innerHTML = "";
} else if (isNaN(godini)) {
link.href = "#";
poraka.innerHTML = "please insert number for age";
} else if (godini < 18) {
link.href = "#";
poraka.innerHTML = "Sorry you are to young to enter";
} else {
link.href = "http://www.google.com";
}
} else {
link.href = "#";
}
}