How to call javascript function at the end of loading page ? I a开发者_Go百科dd at the end of page, but is there any other way ?
Use onload
If you're using jquery, you can use ready()
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()">
精彩评论