gigster76
06-01-2005, 01:56 AM
Im current learning basic java in my summer school class. I need to change this code so that both "if" statements use on compound expression like "&&".
I have tried to do this with no sucess. Here is my code.
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN"
"http://www.w3.org/TR/xhtmll/DTD/xhtmll-strict.dtd">
<html>
<head>
<title>Gas Prices</title>
<script type="text/javascript" language="javascript">
<!-- HIDE FROM INCOMPATIBLE BROWSERS
var gasPrice = 1.57;
if (gasPrice > 1) {
if (gasPrice < 2)
document.write("<p>Gas prices are between $1.00 and $2.00.</p>");
}
// STOP HIDING FROM INCOMPATIBLE BROWSERS -->
</script>
</head>
<body>
</body>
</html>
I have tried to do this with no sucess. Here is my code.
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN"
"http://www.w3.org/TR/xhtmll/DTD/xhtmll-strict.dtd">
<html>
<head>
<title>Gas Prices</title>
<script type="text/javascript" language="javascript">
<!-- HIDE FROM INCOMPATIBLE BROWSERS
var gasPrice = 1.57;
if (gasPrice > 1) {
if (gasPrice < 2)
document.write("<p>Gas prices are between $1.00 and $2.00.</p>");
}
// STOP HIDING FROM INCOMPATIBLE BROWSERS -->
</script>
</head>
<body>
</body>
</html>