我已将以下小程序标记转换为对象标记,以便它可以工作。但由于某些原因,下面的不起作用。首先,下面是否应该正确转换?将APPLET标记转换为IE6的OBJECT标记
小程序:
document.writeln('<applet');
document.writeln(' code="LittleShootApplet"');
document.writeln(' id="LittleShootApplet" name="LittleShootApplet"');
document.writeln(' scriptable="true"');
document.writeln(' mayscript="true"');
document.writeln(' height="0" width="0"');
document.writeln(' style="xdisplay: none; width:0; height:0; padding:0; margin:0;" >');
document.writeln('</applet>');
对象:
document.writeln('<OBJECT ');
document.writeln('classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="0" height="0">');
document.writeln('<PARAM name="code" value="LittleShootApplet">');
document.writeln('<PARAM name="id" value="LittleShootApplet">');
document.writeln('<PARAM name="scriptable" value="true">');
document.writeln('<PARAM name="mayscript" value="true">');
document.writeln('<PARAM name="style" value="xdisplay: none; width:0; height:0; padding:0; margin:0;">');
document.writeln('</OBJECT>');
顺便说一句,我使用JavaScript来写上面的页面。
我在页面上有一个按钮,它尝试使用JavaScript调用Java Applet函数,但是出现此错误。
Message: 'document.LittleShootApplet' is null or not an object
Line: 77
Char: 1
Code: 0
URI: http://localhost/webs/front-end/activity.php
上面的Javascript无法从Java小程序调用函数,因为小程序尚未正确加载。
谢谢大家的帮助。
感谢您的回复,我做了这些改变,但它仍然没有设法加载IE6中的小程序。我将不得不打开一个更具体的问题。谢谢。 – Abs 2009-12-15 12:01:57