案例:JavaScript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<body>
3
4
<script type="text/javascript">
5
var myBoolean=new Boolean();
6
document.write(myBoolean);
7
document.write("<br />");
8
9
var myBoolean=new Boolean(0);
10
document.write(myBoolean);
11
document.write("<br />");
12
13
var myBoolean=new Boolean(null);
14
document.write(myBoolean);
15
document.write("<br />");
16
17
var myBoolean=new Boolean("");
18
document.write(myBoolean);
19
document.write("<br />");
20
21
var myBoolean=new Boolean(false);
22
document.write(myBoolean);
23
document.write("<br />");
24
25
var myBoolean=new Boolean(NaN);
26
document.write(myBoolean);
27
document.write("<br />");
28
</script>
29
30
</body>
31
</html>
32