<script>

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

    #1

    <script>

    I want to crate a script that is run when the page load and when the page
    close.
    This can be done in the <body> section with onload and onunload
    (not sure about the correct syntax right now)

    But my question is:
    Is it possible to crate a <script> that have a parameter like <script
    when=onLoad .... >
    Without adding the function in the <body> ?



  • David Dorward

    #2
    Re: &lt;script&g t;

    GTi wrote:
    [color=blue]
    > Is it possible to crate a <script> that have a parameter like <script
    > when=onLoad .... >
    > Without adding the function in the <body> ?[/color]


    window.onload = function() {
    doStuff();
    doMoreStuff();
    }

    --
    David Dorward <http://dorward.me.uk/>

    Comment

    Working...