Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you Auto-Execute script in .js file?

Status
Not open for further replies.

jsteph

Technical User
Joined
Oct 24, 2002
Messages
2,562
Location
US
I'm just wondering what the mechanism for this is. I got a .js file from somewhere on the web, and did NOT do any onload=xxx or anything, I simply referenced the file in a <script> tag, and the thing is doing it's stuff.

So I'm just wondering---how does it do that?
Thanks,
--Jim
 
If there is any code that is not inside of a function, it will be executed as soon as it is encountered.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Thanks very much...that seems to be the case here,
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top