admin管理员组文章数量:1345139
I have a web app that has a universal HTML header include, so I'd like to put page-specific scripts in each page instead of having it load for everything. I tried putting document.ready()
near the end of the <body>
of a page and it seems to be working fine. Are there any potential hazards to putting it there instead of inside the <head>
?
I have a web app that has a universal HTML header include, so I'd like to put page-specific scripts in each page instead of having it load for everything. I tried putting document.ready()
near the end of the <body>
of a page and it seems to be working fine. Are there any potential hazards to putting it there instead of inside the <head>
?
- Refer this thread stackoverflow./questions/17659121/… – Uday Vaswani Commented Mar 23, 2016 at 2:02
2 Answers
Reset to default 8Yahoo remends putting all scripts at the end of your document for performance - http://developer.yahoo./performance/rules.html
None. Just make sure everything is loaded in the proper order.
本文标签: javascriptdocumentready inside body tagStack Overflow
版权声明:本文标题:javascript - document.ready inside body tag - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743761910a2534534.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论