Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by xfsfsfs ( 1 year ago )
<html>
<head>
<title>Idade</title>
<script>
function calc(){
var ano_nasc = document.getElementbyid("an").value;
var ano_atual = document.getElementbyid("aa").value;
var idade = ano_atual-ano_nasc;
alert("A idade é "+ idade +" anos!");
}
</script>
</head>
<body>
Ano de nascimento: <input type="texte" id="an">
<br><br>
Ano atual: <input type="text" id="aa">
<br><br><br>
<input type="button" value="Calcular" onclick="calc()"/>
</body>
</html>
Revise this Paste