これは簡単な修正です。私は現在、javascriptを使用してウィンドウの高さと幅を取得しており、javascript変数を使用してアプレットの高さと幅を設定したいと考えています。 width="1300" height="700"
がする:幅=ウェハ内の高さ= WINH私はコードをしたいJApplet JavaScriptのHTMLのウィンドウの幅と高さに基づいた幅と高さの設定
<html>
<title>Applet</title>
<head>
<script type="text/javascript">
var winW = 630, winH = 460;
if (document.body && document.body.offsetWidth) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
if (document.compatMode=='CSS1Compat' &&
document.documentElement &&
document.documentElement.offsetWidth) {
winW = document.documentElement.offsetWidth;
winH = document.documentElement.offsetHeight;
}
if (window.innerWidth && window.innerHeight) {
winW = window.innerWidth;
winH = window.innerHeight;
}
</script>
</head>
<body>
<script type="text/javascript">
document.writeln('Window width = '+winW);
document.writeln('Window height = '+winH);
</script>
<applet code="applet.class"
archive="applet7.jar, collections-generic-4.01.jar, colt-1.2.0.jar, jung-api-2.0.1, neo4j-kernel-1.6.M01.jar, blueprints-core-1.1.jar, jung-visualization-2.0.1.jar, jung-algorithms-2.0.1.jar, jung-3d-2.0.1.jar, jung-jai-samples-2.0.1.jar, jung-3d-demos-2.0.1.jar, jung-samples-2.0.1.jar, jung-io-2.0.1.jar, jung-graph-impl-2.0.1.jar, jung-jai-2.0.1.jar, blueprints-graph-sail-1.1.jar, blueprints-dex-graph-1.1.jar, blueprints-neo4j-graph-1.1.jar, blueprints-graph-jung-1.1.jar, blueprints-neo4jbatch-graph-1.1.jar, blueprints-sail-graph-1.1.jar, blueprints-orient-graph-1.1.jar, collections-generic-4.01.jar, blueprints-rexster-graph-1.1.jar, jta.jar, lucene-core-3.1.0.jar, neo4j-lucene-index-1.6.M01.jar, neo4j-remote-graphdb-0.8-1.2.M06.jar"
width="1300" height="700">
</applet>
</body>
</html>
:
は、ここに私のコードです。変数値を<applet>
タグの幅と高さに指定します。
どうすればいいですか?
明確にする必要がある場合はお知らせください。
'deployJava.js'が存在する場合、理由がない(特にアプレット要素を閉じることができないものではない)ホームロールスクリプトを使用しないでください。 –