option to Onload event

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TJS

    #1

    option to Onload event

    Is there a way to have a script fire on page load other than using the
    "Onload" in the body tag ?


  • Grant Wagner

    #2
    Re: option to Onload event

    "TJS" <nospam@here.co m> wrote in message
    news:10vil4tr2t ba8fb@corp.supe rnews.com...[color=blue]
    > Is there a way to have a script fire on page load other than using the
    > "Onload" in the body tag ?[/color]

    <body onload="/* ... code ... */">

    or

    <script type="text/javascript">
    window.onload = function() {
    // code
    }
    </script>

    somewhere on the page.

    --
    Grant Wagner <gwagner@agrico reunited.com>
    comp.lang.javas cript FAQ - http://jibbering.com/faq


    Comment

    • TJS

      #3
      Re: option to Onload event

      thanks!


      Comment

      Working...