Javascript examples for DOM:Document write
Display The Output In The Border Using Functions
<html> <head> <title>Table-2</title> </head> <body onload="myFunction()"> <script> function myFunction() {//w ww . j av a 2 s. c o m var num = 2; for (var i = 1; i < 11; i++) { document.write(num + " * " + i + " = " + num * i); document.write('<br>'); } } </script> </body> </html>