<script>

G

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

David Dorward

GTi said:
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();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top