帮忙看一下哪里有问题,没有输出
<script type="text/javascript">
function count(){
//获取第一个输入框的值
var num1 = document.getElementById('txt1').value;
//获取第二个输入框的值
var num2 = document.getElementById("txt2").value;
//获取选择框的值
var sel = document.getElementById("select").value;
//获取通过下拉框来选择的值来改变加减乘除的运算法则
switch(sel){
case '+':
document.getElementById('fruit').value = parseInt(num1)+parseInt(num2);
break;
case '-':
document.getElementById('fruit').value = parseInt(num1)-parseInt(num2);
break;
case '*':
document.getElementById('fruit').value = parseInt(num1)*parseInt(num2);
break;
default '/':
document.getElementById("fruit").value = parseInt(num1)/parseInt(num2);
}