ArK
ArK

Reputation: 21068

onload function with div

Is it valid to use onload function with div element.

Upvotes: 0

Views: 822

Answers (2)

Brandon E Taylor
Brandon E Taylor

Reputation: 25349

According to the HTML 4.01 specification:

[The onload] attribute may be used with BODY and FRAMESET elements.

The short answer to your question, then, is 'no' (at least if you want to constrain yourself to standard behavior).

Upvotes: 3

timdev
timdev

Reputation: 62894

Not that I'm aware of -- such behavior would likely be fairly hard to define.

Just do whatever you want to do to the div ondomready (or whatever event your favorite javascript utility library provides).

Upvotes: 1

Related Questions