Hi Guys,
I am teaching myself JavaScript. This little program works but I am unable to pass the result to onclick. Could you please help. Thanks.
<!doctype html>
<html>
<h2> 12 Times Table </h2>
<script>
function 12Times()
{
var times=1
for (times =1;times<=12; times++)
alert(times + " times 13 is " +(times * 13) + "<br>");
}
</script>
<body>
<input type="button" onclick="12Times()" value="12Times">
</body>
</html>