Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Client Scripting
Expertise: Beginner
Jan 13, 2000



Application Security Testing: An Integral Part of DevOps

Using More Than One OnLoad Command

Is it possible to use more than one onLoad command in my tag?

Sure. Like other event handlers, the onLoad event handler you're including within the tag on your page can actually be any valid piece of JavaScript code. This means that you're not limited to executing just one command. If you'd like, you can include multiple commands, separating each one with a semicolon (;), as per the standard JavaScript syntax. However, unless you're including only one or two simple commands, you'd be better off calling a function. This gives you the flexibility of adding more complex event handling code later on without making your HTML hard-to-read.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date