初次学习! 请问:下面代码哪里出错了?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>dount selected example</title>
<script language="javascript">
function checkClearBoxes(){
document.form1.boxGroup1.checked=false;
document.form1.boxGroup2.checked=false;
document.form1.boxGroup3.checked=false;
document.form1.boxGroup4.checked=false;
document.form1.boxGroup5.checked=false
}
function setCheckBox(number){
switch(number){
case:1
document.form1.boxGroup1.checked=true;
break;
case:2
document.form1.boxGroup2.checked=true;
break;
case:3
document.form1.boxGroup3.checked=true;
break;
case:4
document.form1.boxGroup4.checked=true;
break;
case 5:
document.form1.boxGroup5.checked=true;
break;
}
}
function calculateCost(){
var cost=0;
if(document.form1.boxGroup1.checked=true){
cost=cost+50}
if(document.form1.boxGroup2.checked=true){
cost=cost+50}
if(document.form1.boxGroup3.checked=true){
cost=cost+50}
if(document.form1.boxGroup4.checked=true){
cost=cost+50}
if(document.form1.boxGroup5.checked=true){
cost=cost+50}
document.form1.textbox.value="Total cost:$"+cost
}
function radio1Cliked(){
checkClearBoxes();
setCheckBox();
calculateCost()
}
function radio2Cliked(){
checkClearBoxes();
setCheckBox(4);
calculateCost()
}
function radio3Cliked(){
checkClearBoxes();
setCheckBox(3);
setCheckBox(5);
calculateCost()
}
function radio4Cliked(){
checkClearBoxes();
setCheckBox(2);
setCheckBox(3);
calculateCost()
}
function radio5Cliked(){
checkClearBoxes();
setCheckBox(4);
setCheckBox(5);
calculateCost()
}
function box1Cliked(){
checkClearBoxes()
}
function box2Cliked(){
checkClearBoxes()
}
function box3Cliked(){
checkClearBoxes()
}
function box4Cliked(){
checkClearBoxes()
}
function box5Cliked(){
checkClearBoxes()
}
</script>
</head>
<center>
<form name="form1">
<body>
<h1>dount select</h1>
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr align="left">
<td><input type="radio" checked name="radioGroup" onClick="radio1Cliked()">one</td>
</tr>
<tr align="left">
<td><input type="radio" name="radioGroup" onClick="radio2Cliked()">tow</td>
</tr>
<tr align="left">
<td><input type="radio" name="radioGroup" onClick="radio3Cliked()">three</td>
</tr>
<tr align="left">
<td><input type="radio" name="radioGroup" onClick="radio4Cliked()">four</td>
</tr>
<tr align="left">
<td><input type="radio" name="radioGroup" onClick="radio5Cliked">five</td>
</tr>
</table>
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr align="left">
<td><input type="checkbox" name="boxGroup1" onClick="box1Cliked()">one</td>
</tr>
<tr align="left">
<td><input type="checkbox" name="boxGroup2" onClick="box2Cliked()">tow</td>
</tr>
<tr align="left">
<td><input type="checkbox" name="boxGroup3" onClick="box3Cliked()">three</td>
</tr>
<tr align="left">
<td><input type="checkbox" name="boxGroup4" onClick="box4Cliked()">four</td>
</tr>
<tr align="left">
<td><input type="checkbox" name="boxGroup5" onClick="box5Cliked">five</td>
</tr>
<tr>
<td><input type="text" name="textBox" size="20" maxlength="20"></td>
</tr>
</table>
<br clear="all">
</center>
</form>
</body>
</html>