rendered paste body<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <title>sin título</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta name="generator" content="Geany 0.11" /> <script type="text/javascript"> function mostrartabla(numero){ alert(numero); var a= document.getElementById("res"); a.innerHTML=""; for (i=1; i<=10; i++){ a.innerHTML+=numero +" x " + i +" = "+numero*i +"<br>\n"; } } </script></head><form name="form1" action="javascript:void(0)" method="post"><input name="valor" id="valor" /><input type="button" value="enviar" onclick="mostrartabla(valor.value)"></form><div id="res"></div><body> </body></html>