-2
Well I’m trying to make a simple html page where the user type a number and then the page shows the Full of it. Only I’m not getting the page to type Abuda, someone can help me?
<header><h3>Tabuada</h3></header>
<p><input type="number" name="n" id="n" placeholder="Digite um numero"></p>
<p><button type="submit" onclick="tabuada()">Executar</button></p>
<div id='tab' style='display:inline'></div>
<script>
function tabuada(){
var resultado = document.getElementById('tab');
var text = '';
var num = parseInt(document.getElementById("n").value);
for(var x=1; x<=10; x++){
text += num+"x"+i+"="+num*i+"<br />";
}
resultado.innerHTML = text;
}
</script>
</body>
</html>