1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
<title>Boolean類型</title>
6
<script type="text/javascript">
7
/*
8
* 項目: book -> Javascript高級程序設計.pdf -> 第2章 -> 2.6 原始類型
9
*
10
* 說明: Boolean類型它有兩個值true和false(即兩個Beoolean字面量)。即使false不等于0,0也可以在必要時被轉換成false,這樣在Boolean語句中使用兩者都是安全的。
11
*
12
* 練習者: Alex刺客
13
*
14
* 日期: 2009-12-13
15
*/
16
17
var bFalse = false;
18
var bTrue = true;
19
alert(bFalse);
20
alert(bTrue);
21
</script>
22
</head>
23
<body>
24
</body>
25
</html>

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25
