mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
69 lines
1.0 KiB
HTML
69 lines
1.0 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>TrivialApplet</TITLE>
|
|
</HEAD>
|
|
|
|
<SCRIPT LANGUAGE="JavaScript">
|
|
|
|
var System = java.lang.System;
|
|
|
|
function writeln(text)
|
|
{
|
|
document.write("<P>", text, "</P>");
|
|
}
|
|
|
|
function println(text)
|
|
{
|
|
System.out.println(text);
|
|
}
|
|
|
|
function examineApplets()
|
|
{
|
|
var applets = document.applets;
|
|
println("applets.length = " + applets.length);
|
|
}
|
|
|
|
function examineTrivialApplet(applet)
|
|
{
|
|
applet.print("url = " + applet.urlField.getText());
|
|
// println("url = " + applet.urlField.getText());
|
|
}
|
|
|
|
</SCRIPT>
|
|
|
|
<BODY onload="examineApplets();">
|
|
|
|
<P>
|
|
<APPLET
|
|
ARCHIVE="AppletClasses.jar"
|
|
NAME="TrivialApplet"
|
|
CODE="TrivialApplet.class"
|
|
MAYSCRIPT="true"
|
|
WIDTH=200 HEIGHT=200>
|
|
<PARAM NAME="URL" VALUE="http://home.netscape.com">
|
|
</APPLET>
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
<a href="TrivialApplet.java">The source.</a>
|
|
|
|
<form>
|
|
|
|
<P>
|
|
|
|
<input type=button
|
|
onclick="examineApplets();"
|
|
value="examineApplets()">
|
|
|
|
<input type=button
|
|
onclick="examineTrivialApplet(document.TrivialApplet);"
|
|
value="examineTrivialApplet()">
|
|
|
|
</P>
|
|
|
|
</form>
|
|
|
|
</BODY>
|
|
</HTML>
|