salve a tutti io ho creato un bottone generico che con il clic mi verifica l'eta che può entrare in un sito allora se è minore di 13 rimane un bottone generico nivee se ne ha di più va al sito adesso vi mando il file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Verifica</title>
</head>
<body bgcolor="blue">
<form action="home.html" target="_blank">
<input type="button" onclick="show_alert()" value="verifica" id= "Entra" />
<script >
var anno = prompt("In che anno sei nato?", "inserisci l'anno di nascita");
if (anno != null) {
var dt = new Date();
var anno_corrente = dt.getFullYear();
var eta = (anno_corrente - anno);
if (eta < 13) {
function show_alert()
{
alert("non puoi entrare in questo sito");
}
}else{
entra.onclick= function() {
confirm("sei sicuro di avere messo i dati giusti");
}
}
}
</script>
</body>
</html>