RetroZilla/plugin/oji/MRJ/testing/TrivialApplet/TrivialApplets.html

78 lines
1.3 KiB
HTML
Raw Normal View History

2015-10-21 05:03:22 +02:00
<HTML>
<HEAD>
<TITLE>TrivialApplets</TITLE>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
var System = java.lang.System;
var println = System.out.println;
function writeln(text)
{
document.write("<P>", text, "</P>");
}
function examineApplets()
{
var applets = document.applets;
println("applets.length = " + applets.length);
}
function examineTrivialApplet(applet)
{
applet.print("url = " + applet.urlField.getText());
applet.print("appletCount = " + applet.getAppletCount());
}
</SCRIPT>
<BODY>
<HR>
<APPLET
ARCHIVE="AppletClasses.jar"
NAME="TrivialApplet_0"
CODE="TrivialApplet.class"
MAYSCRIPT="true"
WIDTH=200 HEIGHT=200>
<PARAM NAME="URL" VALUE="http://home.netscape.com">
</APPLET>
<HR>
<APPLET
ARCHIVE="AppletClasses.jar"
NAME="TrivialApplet_1"
CODE="TrivialApplet.class"
MAYSCRIPT="true"
WIDTH=200 HEIGHT=200>
<PARAM NAME="URL" VALUE="http://www.apple.com">
</APPLET>
<HR>
<P>
<a href="TrivialApplet.java">The source.</a>
</P>
<FORM>
<INPUT type=button
onclick="examineApplets();"
value="examineApplets()">
<INPUT type=button
onclick="examineTrivialApplet(document.applets[0]);"
value="examineTrivialApplet(0)">
<INPUT type=button
onclick="examineTrivialApplet(document.applets[1]);"
value="examineTrivialApplet(1)">
</FORM>
</BODY>
</HTML>