什么时候onLoad被调用? [英] When does a body onLoad gets called?
问题描述
我需要了解什么时候
我读过 w3school onload =文档加载时运行的脚本
这是什么意思?
这是否意味着
- html / jsp页面在像任何
table 或jsp scriplets(例如:
<%= request.getParameter(NAME))呈现任何元素之前被加载%>
- 或者是在页面/正文呈现之后?
例如:
我有一堆params (<%= request.getParameter(NAME)%>,...)
所以为了使用它们,我将它们放置在一些隐藏的形式项目&那么在身体负荷上我可以使用它们吗? w3schools , MDN解释事件何时开始 :
load事件在文档加载过程结束时触发。此时,文档中的所有对象都位于DOM中,并且所有图像和子帧都已完成加载。
因此,DOM树已准备就绪和所有元素都已加载。
I need to understand when does a body's onload
gets called
I read in w3school that onload=Script to be run when a document load
what does this mean?
Does it mean that
- the html/jsp page gets loaded before rendering any elements in the body like any
table
or jsp scriplets eg:<%= request.getParameter("NAME") %>
- Or is it after the page/body is rendered?
for example:
I have a bunch of params (<%= request.getParameter("NAME") %>,...)
so in order to use them i'll place them in some hidden form item & then on body load can I use them?
Unlike w3schools, MDN explains when the event is fired:
The load event fires at the end of the document loading process. At this point, all of the objects in the document are in the DOM, and all the images and sub-frames have finished loading.
So the DOM tree is ready and all elements have been loaded.
这篇关于什么时候onLoad被调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!