-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbmbench_java.html
83 lines (71 loc) · 2.54 KB
/
bmbench_java.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>BM Bench06</title>
<script type="text/javascript">
//<![CDATA[
<!--
//
//http://www.hunlock.com/blogs/Ten_Javascript_Tools_Everyone_Should_Have
function htmlEntities(str) {
//return str;
if (str && typeof str == 'string') {
return str.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
} else {
return str;
}
};
function list_applets() {
var win = window.open("","Result","width=640,height=300,resizable=yes,scrollbars=yes,dependent=yes");
if (win.focus) { win.focus(); }
win.document.open("text/html", "reuse");
win.document.writeln("<html><head><title>Applet List</title></head><body><pre>");
win.document.writeln("Java is "+ ((navigator.javaEnabled()) ? '' : 'not ') +"enabled.<br />");
if (!document.applets) {
window.alert("Warning: documents.applets not available!");
return 1;
}
for (var app1 = 0; app1 < document.applets.length; app1++) {
var out = "---> document.applets["+ app1 +"]" + "\n";
for (var prop1 in document.applets[app1]) {
out += "document.applets["+ app1 +"]."+ prop1 +": "+ htmlEntities(document.applets[app1][prop1]) +"\n";
}
win.document.writeln(out); //document.write(out);
}
win.document.writeln("</pre></body></html>");
win.document.close();
}
function run_applet(idx) {
//document.applets[0].simbench();
document.applets[idx].simbench();
}
//-->
//]]>
</script>
</head>
<body>
<h1>BM Bench</h1>
<hr />
<b>Java Applet</b>
<br />
<applet codebase="." code="bmbench.class" name="bmbench" width="100" height="100">
<param name="bench1" value="0" />
<param name="bench2" value="5" />
<param name="n" value="1000000" />
alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason."
Your browser is completely ignoring the <APPLET> tag!
</applet>
<form action="">
<!-- <input type="button" id="bench06" name="bench06" value="bench06_java" onclick="document.applets[0].simbench()" /> -->
<input type="button" id="bench06" name="bench06" value="bench06_java" onclick="run_applet(0)" />
<input type="button" id="list_applets1" name="list_applets1" value="List Applets" onclick="list_applets()" />
</form>
<br />
<hr />
<noscript>
<b>Please activate JavaScript to use the functionality of this page!</b>
</noscript>
<address><font size="-1">© <a href="http://www.benchmarko.de">Marco Vieth</a>, 01.12.2006</font></address>
</body>
</html>