var result = "";什么意思?
var result = "";
switch(oSlt) {
case "+":
result = parseFloat(oTxt1) + parseFloat(oTxt2);
break;
case "-":
result = parseFloat(oTxt1) - parseFloat(oTxt2);
break;
case "*":
result = parseFloat(oTxt1) * parseFloat(oTxt2);
break;
default:
result = parseFloat(oTxt1) / parseFloat(oTxt2);
}
document.getElementById("fruit").value = result;