为什么没有结果呢?
<!DOCTYPE html>
<html>
<head>
<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'>
</head>
<body>
<script type="text/javascript">
function count(){
var a=document.getElementById("txt1").value;
var b=document.getElementById("select").value;
var c=document.getElementById("txt2").value;
var result="";
switch(b){
case "+":
result=parseInt(a)+parseInt(c);
break;
case "-":
result=parseInt(a)-parseInt(c);
break;
case "*":
result=parseInt(a)*parseInt(c);
break;
default:
result=parseInt(a)/parseInt(c);
break;
}
document.getElementById("txt3").value=result;
}
</script>
</body>
</html>