• Archives

  • AddThis Social Bookmark Button

    Add to Technorati Favorites

  • Looping through the headers in javascript

    By krates | November 10, 2007

    Well it is a good thing to look at looping examples to learn it thoroughly:

    example looping through the headers

    <html>
    <body>

    <script type=”text/javascript”>
    for (i = 1; i <= 6; i++)
    {
    document.write(“<h” + i + “><center>welcome to the jungle</center>”)
    document.write(“</h” + i + “>”)
    }
    </script>

    </body>
    </html>

    This will loop through the heading tags using the for event

     Thanks

    krates

    Share and Enjoy:
    • Digg
    • del.icio.us
    • Facebook
    • NewsVine
    • Reddit
    • StumbleUpon
    • YahooMyWeb
    • Google Bookmarks
    • Yahoo! Buzz
    • TwitThis
    • Live
    • LinkedIn
    • Pownce
    • MySpace

    Topics: Javascript | No Comments »

    Related Links:

    Comments

    Security Code: