math table

<html>

<head>

<title>Print a Math table</title>

<script type="text/javascript">
    function math_table()
    {
        
        number = prompt("Required math table number:", "10")
        var day = new Date()
        var D = day.getDate()
        var H = day.getHours()
        var M = day.getMinutes()
        var S = day.getSeconds()
        document.write("Date:" + D + "  Time:" + H + ":" + M + ":" + S)
        document.write("<b><br><br>Math table for " + number + ":<br></b>")
        for(i=1; i<=10; i++)
        {
            result = i * number
            document.write("<br>" + number + " x " + i + " = " + result)
        }
    }
</script>

</head>

<body>



<input type="button" value="Generate Math Table" onclick="math_table()" />


</body>

</html>

No comments:

My Favorite Books

  • C and Data Structures by Ashok N. kamthane
  • Web Technologies by A. A. Puntambekar
  • Learn HTML and CSS with W3Schools
  • Learn JavaScript and Ajax with W3Schools
  • HTML5 Black Book: Covers Css3, Javascript,XML, XHTML, Ajax, PHP And Jquery
  • HTML5 Application Development Fundamentals: MTA Exam 98-375
  • .NET 4.0 Programming 6-In-1, Black Book
  • SQL Server 2008 R2 Black Book
  • Asp.net 4.0 Projects Covers: net 3.5 And .net 4.0 Codes, Black Book
  • UNIX Shell Programming 1 Edition by Yashavant Kanetkar
  • UNIX and Shell Programming 1 Edition by Richard F. Gilberg, Behrouz A. Forouzan
  • Computer Networks by Andrew S. Tanenbaum
  • Multiple Choice questions in computer science by Timothy J Williams