<html>
<head>
<title>Title of Page</title>
<script type=”text/javascript”>
var i = 0;
</script>
<script type=”text/javascript” src=”../scripts/external.js”></script>
</head>
<body>
<!-- body goes here -->
</body>
</html>
<SCRIPT type=”text/javascript”>
function compare(a, b) {
if (a < b) {
alert(“A is less than B”);
} else if (a > b) {
alert(“A is greater than B”);
} else {
alert(“A is equal to B”);
}
}
</SCRIPT>
<SCRIPT type=”text/javascript”>
function compare(a, b) {
if (a < b) {
alert("A is less than B");
} else if (a > b) {
131
JavaScript in the Browser
alert("A is greater than B");
} else {
alert("A is equal to B");
}
}
</SCRIPT>
<SCRIPT type=”text/javascript”>
<![CDATA[
function compare(a, b) {
if (a < b) {
alert(“A is less than B”);
} else if (a > b) {
alert(“A is greater than B”);
} else {
alert(“A is equal to B”);
}
}
]]>
</SCRIPT>
<SCRIPT type=”text/javascript”>
//<![CDATA[
function compare(a, b) {
if (a < b) {
alert(“A is less than B”);
} else if (a > b) {
alert(“A is greater than B”);
} else {
alert(“A is equal to B”);
}
}
//]]>
</SCRIPT>