开发者

Javascript library to reliably load Java Applets?

Flash users have the wonderful SwfObject JavaScript library that abstracts browser differences to reliably embed swfs into their web pages. Is there a JavaScript library like this for Jav开发者_运维问答a Applets?


Oracle itself comes with deployJava.js for this. Here's an example copied from the link:

<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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜