求大佬看一下为什么结果是错误
<!DOCTYPE html>
<html>
<head>
<title> 事件</title>
<script type="text/javascript">
function count(){
var a;
var b=document.getElementById("tex1");
var c=document.getElementById("tex2");
var d=document.getElementById("select");
switch(d){
case"+":a=b+c;
break;
case"-":a=b-c;
break;
case"*":a=b*c;
break;
case"/":a=b/c;
break;
}
document.getElementById("fruit").value=a;
}
</script>
</head>
<body>
<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='fruit' />
</body>
</html>