3-4 布?

JavaScript L]Boolean^ƫAȥuءGtrue M falseAӬLܼƦhbOѤBlҲ͡AoǤBl]tu>v]j^B u
Example]boolean01.htm^G

WzdҪlɦpUG

lɡ]boolean01.htm^G]ǦϰUYi^
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">
</head>

<body>
<h2 align=center> Boolean ƫA</h2>
<hr>

<script>
x = 5;
y = 5;
z = 10;
document.write(" x = " + x + "<br>");
document.write(" y = " + y + "<br>");
document.write(" z = " + z + "<br>");
document.write("x==y ==> " + (x==y) + "<br>");		// LX true
document.write("y==z ==> " + (y==z) + "<br>");		// LX false
document.write("x=z ==> " + (x=z) + "<br>");		// LX 10
</script>

<hr>
</body>
</html>

bWzdҤA(x==y) M (y==z) |ըӼƥجO_۵A]|^ǥL` true M falseAO (x=z) O@ӫԭzA]^ǪȴNOQȡC


JavaScript {]pPΡGΩΤ