зеркало из https://github.com/mozilla/pjs.git
78 строки
1.3 KiB
HTML
78 строки
1.3 KiB
HTML
<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>
|