+ 1
Why is the java script code being placed just before the closing body tag ?
2 Respuestas
+ 3
So that
it load after all body content loaded
and you don't get error like
can't see property of null.
If you keep it in <head>
You document may take a little time to load.as it(body tag) will load after js(inside head)