469,603 Members | 2,110 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,603 developers. It's quick & easy.

<script>

GTi
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> ?

Jul 20 '05 #1
1 1181
GTi wrote:
Is it possible to crate a <script> that have a parameter like <script
when=onLoad .... >
Without adding the function in the <body> ?

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

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Madhav | last post: by
1 post views Thread by Grzegorz ¦lusarek | last post: by
21 posts views Thread by hemant.singh | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.