27 lines
824 B
HTML
Executable File
27 lines
824 B
HTML
Executable File
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<title>Example 4.13</title>
|
|
<script>
|
|
var counterA = 8;
|
|
var counterB = 0;
|
|
document.write('<table align = "center" <tr><td>');
|
|
document.write('<h1> <br /> </h1>');
|
|
document.write("<h3> counterA = " + counterA + "</h3>");
|
|
counterB = counterA++;
|
|
document.write("<h3> counterB = counterA++ so counterB now = " + counterB + "</h3>");
|
|
document.write("<h3> counterA++ = " + counterA + "</h3>");
|
|
counterC = 8;
|
|
counterD = 0;
|
|
document.write("<h3> counterC = " + counterC + "</h3>");
|
|
counterD = ++counterC;
|
|
document.write("<h3> counterD = ++counterC so counterD now = " + counterD + "</h3>");
|
|
document.write("<h3> ++counterC = " + counterC + "</h3>");
|
|
document.write('</td></tr></table>');
|
|
</script>
|
|
</head>
|
|
<body>
|
|
</body>
|
|
</html>
|
|
|