when window.onload is called, an applet should have been loaded, so you can start to use the applet in window.onload event handler
解决方案 »
- struts2+freemarker的问题
- null与""的区别
- tomcat不能重启
- ehcache(缓存问题)向各位前辈们请教问题?
- 怎样从jsp页面中写数据到客户端(手机)啊?为什么我的这个用法有错误?(急,在线等)
- 为什么我的可用分不再涨了?
- 大家给一个HTML或者JSP酒吧的静态原型。
- ◆JSP: 一个百思不得其解的入门问题◆
- jboss+tomcat有几中连接数据库的方式,请给出详细说明?
- 怎样通过读取数据库,对前面的<select>的选择,动态生成后面一个<select>??急用!一定给分,
- JSP关于useBean的问题
- [求助]请问何时使用JSP Tag Library何时使用JavaBean呢?
This applet is uesed for load a picture,so it's a long time for loaded.
I have try to write onload event handler,but nothing was happened!!
<body onload="somefun()">
bdw ,applet not supprt onload event handler right?
onload Event
applies to
APPLET, BODY, EMBED, FRAME, FRAMESET, IFRAME, IMG, LINK, SCRIPT, window http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onload.aspif 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.