Forum : Can anyone help why this Script Not working on Google Chrome?
Brief description  about Online courses   join in Online courses
View Ashika  Jain 's Profile

Can anyone help why this Script Not working on Google Chrome?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/Transitional.dtd"> <html>
<head>
<title>Javascript</title>

<script language="javascript">
function calculate(){
marks= document.frmOne.marks.value

switch (marks) {
case "1":
document.write("You have got A Grade")
break
case "2":
document.write("You have got B Grade")
break
case "3":
document.write("You have got C Grade")
break
case "4":
document.write("You have got D Grade")
break
case "5":
document.write("You have got F Grade")
break
case "6":
document.write("You have got G Grade")
break
default:
alert("undetermined")
}
}
</script>
<style type="text/css">
#fullcover{height:855px;width:900px;
margin-left:auto;
margin-right:auto;
border:5px ridge #CCCCCC ;
background-color:white;}
#logopart{height:60px;
width:895px;
padding-left:5px;
}
#midpart{height:580px;
width:895px;
padding-left:5px;
padding-top:65px;}

</style>
</head>
<body>
<div id = "fullcover">
<div id = "logopart">
<p><h2>Lets learn Javascript Programming - Loop Assignment </h2></p>
<hr/><br/><br/>
<FORM NAME = frmOne>
Select your marks range :

<select name = marks>
<option value = 1>90 to 100</option>
<option value = 2>80 to 89</option>
<option value = 3>70 to 79</option>
<option value = 4>60 to 69</option>
<option value = 5>50 to 59</option>
<option value = 6>less than 50</option>
</select>
<input type=button value="submit" onClick=calculate()>
</form>
</div>
<hr/>
</div>
</body>
</html>


Asked by Ashika Jain | Mar 16, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Time Expired.
Aug 3, 2010