-
Notifications
You must be signed in to change notification settings - Fork 0
/
javascript_version_test.htm
60 lines (52 loc) · 1.32 KB
/
javascript_version_test.htm
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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="big5">
<title>JavaScript version test</title>
</head>
<body>
<script type="text/javascript">
var jsver = 1.0;
</script>
<script language="Javascript1.1">
jsver = 1.1;
</script>
<script language="Javascript1.2">
jsver = 1.2;
</script>
<script language="Javascript1.3">
jsver = 1.3;
</script>
<script language="Javascript1.4">
jsver = 1.4;
</script>
<script language="Javascript1.5">
jsver = 1.5;
</script>
<script language="Javascript1.6">
jsver = 1.6;
</script>
<script type="text/javascript">
document.write('<p><b>Javascript version ' + jsver + ' supported<\/b><\/p>');
//alert(Number.MAX_VALUE+', '+Number.MIN_VALUE);
/*
function StringBuffer(){this.__strings__=new Array;}
StringBuffer.prototype.append=function(str){this.__strings__.push(str);};
StringBuffer.prototype.toString=function(){return this.__strings__.join();};
var d1=new Date();
var str="";
for(var i=0; i<10000; i++)
str += "text";
var d2=new Date();
document.write("Concatenation with plus: "+ (d2.getTime() - d1.getTime()) + " milliseconds");
var oBuffer=new StringBuffer();
d1=new Date();
for(var i=0; i<10000; i++)
oBuffer.append("text");
var sResult=oBuffer.toString();
d2=new Date();
document.write("<br/>Concatenation with StringBuffer: "+ (d2.getTime() - d1.getTime()) + " milliseconds");
*/
</script>
</body>
</html>