0

以下代码在 html 页面中显示一个 java 小程序。

<SCRIPT LANGUAGE="JavaScript"><!--
if (_ie == true) 
    document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = "100%" HEIGHT = "100%" NAME = "WebClientX" ALIGN = "middle" VSPACE = "0" HSPACE = "0"  codebase="http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=1,6,0,0"><NO EMBED><XMP>');
else if (_ns == true) 
    document.writeln('<EMBED type="application/x-java-applet;version=1.6"  CODE = "webclientx.Applet1" ARCHIVE = "WebClientX.jar" CODEBASE = "." NAME = "WebClientX" WIDTH = "100%" HEIGHT = "100%" ALIGN = "middle" VSPACE = "0" HSPACE = "0" ServerName =  "" Synoptic = "Hauptansicht" ServerPort =  "12233" UserName =  "" Password =  "" Protocol =  "0" Compress =  "false" Encrypt =  "false" Sealing =  "0" Timeout =  "60000" ShowMenu = "false" MouseMotion = "true" MouseClicks = "true" KeyEvents = "true" ShowStatusBar = "true" PlaySoundOnAlarm = "true" scriptable=false pluginspage="http://java.sun.com/javase/downloads/index.jsp"><NO EMBED><XMP>');
//--></SCRIPT> 
... 
...
...

我有两个选择:

  1. 定义固定大小
  2. 使其尽可能大(小程序在宽屏显示器上被篡改/扭曲)

我需要第三种选择:小程序应该尽可能大,但不会失真。

这可能吗?

谢谢

4

1 回答 1

0

解决方法是将上面的代码放在一个DIV里面,把上面代码中的size设置为100%,然后根据viewportsize每秒更新一次div的大小。

于 2013-03-27T08:44:48.853 回答