为什么按“=”结果不显示出来呢
function count(){
var oTxt1 = document.getElementById("txt1").value;
var oTxt2 = document.getElementById("txt2").value;
var oSlt = document.getElementById("select").value;
var result = " ";
switch(oSlt) {
case "+":
result = parseInt(oTxt1) +parseInt(oTxt2);
break;
case "-":
result = parseInt(oTxt1) - parseInt(oTxt2);
break;
case "*":
result = parseInt(oTxt1) * parseInt(oTxt2);
break;
default:
result =parseInt(oTxt1) / parseInt(oTxt2);
}
document.getElementById("fruit").value = result;
}