Reputation: 56199
How to call javascript function at the end of loading page ? I add at the end of page, but is there any other way ?
Upvotes: 2
Views: 3489
Reputation: 22114
Adding it to the end is actually wrong because of the way it may behave with different browsers.
You should add it to the onload event of the body tag.
e.g
<body onload="DoAfterPageLoad()">
Upvotes: 2