Table of a number of javascript values entered by the user in the form
In this tutorial, we will cover the followings;
Flowchart of the program to show the table of a number in Javascript.
- Flowchart of the program to show the table of a number in Javascript.
- Program to show the table of a number in Javascript.
- Program to show the table of a number in Javascript form.
Flowchart of the program to show the table of a number in Javascript.

Program to show the table of a number in Javascript.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
<span style="font-family: arial, helvetica, sans-serif; font-size: 14pt;"><html> <head> <script> function table() { var x= Number(document.getElementById("number").value); var l= Number(document.getElementById("limit").value); for(var z=1; z<=l; z++) { var y= document.getElementById("answer"); y.innerHTML +=(x*z) + "<br/>" } } </script> </head> <body bgcolor="yellow"> <h1 align="center"><font color="red">Maths Table</font></h1> <p><b>Enter The Number:</b></p> <input type="number" id="number" name="Number"> <p><b>Enter The Limit:</b></p> <input type="number" id="limit" name="Limit"> <h3> Click the button below to get the result</h3> <button onclick="table()"/>Table</button> <h2><font color="red">Answer</font></h2> <font color="red"><h3 id="answer"></h3> </font></body> </html></span> |
Program to show the table of a number in Javascript form.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
<span style="font-family: arial, helvetica, sans-serif; font-size: 14pt;"><html> <head> <body bgcolor="yellow"> <font color="red"><h1 align="center">Maths Table</h1> </font> <p><b>Table of 5</b></p> <h5 id="answer"></h5> <script> var x= 5; var y= ""; for(var z=1; z<=10; z++) { y += x+ " x " +z+ "=" +(x*z)+ "<br/>"; } document.write(y); </script> </head> </body> </html> </span> |
Topic Covered