Flash用户具有出色的SwfObject JavaScript库,该库可以抽象化浏览器差异,从而将swfs可靠地嵌入其网页中。是否有用于Java Applets的JavaScript库?
最佳答案
Oracle本身为此提供了deployJava.js。这是从链接复制的示例:
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
var attributes = {codebase:'http://java.sun.com/products/plugin/1.5.0/demos/jfc/Java2D',
code:'java2d.Java2DemoApplet.class',
archive:'Java2Demo.jar',
width:710, height:540} ;
var parameters = {fontSize:16} ;
var version = '1.6' ;
deployJava.runApplet(attributes, parameters, version);
</script>