javascript调用applet

首先将applet打包
再html body中加入
<object id="signApplet"
	    classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
	    codebase = "<%=basePath%>appletSign/jre-6u21-windows-i586-s.exe"
	    WIDTH = "0" HEIGHT = "0" >
	    <PARAM NAME = CODE VALUE = "com.orifound.aiim.util.FileSignerAppletForBatch" >
	    <PARAM NAME = ARCHIVE VALUE = "<%=basePath%>appletSign/appletSign.jar" >
	    <param name = "type" value = "application/x-java-applet;version=1.6">
	    <param name = "scriptable" value = "false">
	
	    <comment>
		<embed
	            type = "application/x-java-applet;version=1.6" 
	            CODE = "com.orifound.aiim.util.FileSignerApplet" 
	            ARCHIVE = "appletSign.jar" 
	            WIDTH = "0" 
	            HEIGHT = "0"
		        scriptable = false
		        pluginspage = "<%=basePath%>appletSign/jre-6u21-windows-i586-s.exe">
		    <noembed>
	        </noembed>
		</embed>
	    </comment>
	</object>
	<object id="attachedFileOffLineApplet"
	    classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
	    codebase = "<%=basePath%>appletSign/jre-6u21-windows-i586-s.exe"
	    WIDTH = "0" HEIGHT = "0" >
	    <PARAM NAME = CODE VALUE = "com.orifound.aiim.util.AttachedFileOffLineApplet" >
	    <PARAM NAME = ARCHIVE VALUE = "<%=basePath%>appletSign/appletSign.jar" >
	    <param name = "type" value = "application/x-java-applet;version=1.6">
	    <param name = "scriptable" value = "false">
	
	    <comment>
		<embed
	            type = "application/x-java-applet;version=1.6" 
	            CODE = "com.orifound.aiim.util.FileSignerApplet" 
	            ARCHIVE = "appletSign.jar" 
	            WIDTH = "0" 
	            HEIGHT = "0"
		        scriptable = false
		        pluginspage = "<%=basePath%>appletSign/jre-6u21-windows-i586-s.exe">
		    <noembed>
	        </noembed>
		</embed>
	    </comment>
	</object>


调用示例:
 var fileSign = document.getElementById('signApplet');

你可能感兴趣的:(JavaScript,java,html,windows)