直接顯示 直接顯示

<html>
<head>
<meta charset="big5"/>
<title>Ch6_4_4.htm</title>
</head>
<body>
<h2>測試do while迴圈</h2>
<hr/>
<script>
var i = 1;
var intSum = 0;
do {
document.write("整數: " + i + "<br/>");
intSum += i;
i++;
} while (i <= 18);
document.write("<hr/>總和: " + intSum + "<br/>");
</script>
<input type="button"value="click!!click me"onclick="showmessage()">
</body>
</html>