Make your own free website on Tripod.com

~Chao Li~

~Kumo no Mukou, Yakusoku no Basho~

 
~~~~

<html>
<head>
<title>manyTemps</title>
<script>
//manyTemps
//Chao Li. October2, 2007.
//Demestrates the if/else structure

var temp = 0;
temp = Math.floor(Math.random() * 100) + 1;
alert ("It's " +temp+ " degrees outside.");

if (temp < 7) {
if (temp < 30) {
alert ("Wear a jacket!!");
} else {
alert ("Wear a sweater!!");
}// end 30 if
} else {
if(temp > 85) {
alert ("Wear a bathing suit!!");
} else {
alert ("Wear short sleeves");
}// end 85 if
}// end 70 if

</script>
</head>

<body>
<center><center>
<h1>manyTemps<br></h1>
</center>
<hr>
<h3>Hit Reload to see another temperture</h3>
</body>
</html>

 
 
 
~~~~