求助各位大神,为什么运行不了????
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>practice</title>
<script>
function count(){
var aa=document.getElementById("txt1");
var bb=document.getElementById("txt2");
var cc=document.getElementById("select");
var result=" ";
switch(cc){
case "+":result=parseFloat(aa)+parseFloat(bb);
break;
case "-":result=aa-bb;
break;
case "*":result=aa*bb;
break;
case "/":result=aa/bb;
break;
}
document.getElementById("txt3").value=result;
}
</script>
</head>
<body>
<form>
<input type="text" id="txt1">
<select id="select">
<option value="+">+</option>
<option value="-">-</option>
<option value="*">*</option>
<option value="/">/</option>
</select>
<input type="text" id="txt2">
<input type="button" value="=" onclick="count()">
<input type="text" id="txt3">
</form>
</body>
</html>