当前位置: 技术问答>java相关
页面中applet载入完成的事件是什么?
来源: 互联网 发布时间:2015-02-16
本文导语: rt | According to MSDN: onload Event applies to APPLET, BODY, EMBED, FRAME, FRAMESET, IFRAME, IMG, LINK, SCRIPT, window http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onload.asp if you are interested, this ...
rt
|
According to MSDN:
onload Event
applies to
APPLET, BODY, EMBED, FRAME, FRAMESET, IFRAME, IMG, LINK, SCRIPT, window
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onload.asp
if you are interested, this article might be helpful:
http://groups.google.com/groups?hl=en&threadm=3B2EB0AB.3C87009C%40eatel.net&rnum=4&prev=/groups%3Fq%3Dapplet%2Bonload%26hl%3Den%26rnum%3D4%26selm%3D3B2EB0AB.3C87009C%2540eatel.net
An applet will be fully loaded (cached) at the document onload event, but, as soon as the browser gets a chance AFTER loading, the applet's constructor is called [although MOST applets forgo using the constructor] then the init() method. Depending on how involved this init method is, it could be a noticeable
length of time before the applet's start() method can be called.
An applet is NOT accessible until the init() method has finished
executing, and therefore, not available until the start method is
called.
Applets are fully threaded, and there is usually quite a lot of activity
still happening in the browser, even after the onload event has fired
[possibilities range from animated gifs to other media file types, like
midi, etc... to other applets being on the page]. You cannot depend on
an applet being ready, in some cases, for up to a couple of seconds or
so because applets have "medium" thread priority.
A LiveConnected applet should "contact" JavaScript when it is ready to
be accessed. There are several ways to do this, but one of the easiest
is to simply call a "start" routine in JavaScript. One of the things
this routine should do is set a global "appletReady" variable to true
and all your JavaScript routines (that need applet access) should check
this variable before trying to access the applet.
onload Event
applies to
APPLET, BODY, EMBED, FRAME, FRAMESET, IFRAME, IMG, LINK, SCRIPT, window
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onload.asp
if you are interested, this article might be helpful:
http://groups.google.com/groups?hl=en&threadm=3B2EB0AB.3C87009C%40eatel.net&rnum=4&prev=/groups%3Fq%3Dapplet%2Bonload%26hl%3Den%26rnum%3D4%26selm%3D3B2EB0AB.3C87009C%2540eatel.net
An applet will be fully loaded (cached) at the document onload event, but, as soon as the browser gets a chance AFTER loading, the applet's constructor is called [although MOST applets forgo using the constructor] then the init() method. Depending on how involved this init method is, it could be a noticeable
length of time before the applet's start() method can be called.
An applet is NOT accessible until the init() method has finished
executing, and therefore, not available until the start method is
called.
Applets are fully threaded, and there is usually quite a lot of activity
still happening in the browser, even after the onload event has fired
[possibilities range from animated gifs to other media file types, like
midi, etc... to other applets being on the page]. You cannot depend on
an applet being ready, in some cases, for up to a couple of seconds or
so because applets have "medium" thread priority.
A LiveConnected applet should "contact" JavaScript when it is ready to
be accessed. There are several ways to do this, but one of the easiest
is to simply call a "start" routine in JavaScript. One of the things
this routine should do is set a global "appletReady" variable to true
and all your JavaScript routines (that need applet access) should check
this variable before trying to access the applet.