晕啊 哪里错了 括号还是什么 求大神
<script type="text/javascript">
/* function count(){
//获取第一个输入框的值
//获取第二个输入框的值
//获取选择框的值
//获取通过下拉框来选择的值来改变加减乘除的运算法则
//设置结果输入框的值
}*/
function count(){
var number = document.getElementById("txt1").value;
var number2 = document.getElementById("txt2").value;
var xuanze = document.getElementById("select").value;
var result = "";
if(xuanze == "+")
{
var result = parseInt(number) + parseInt(number2);
} else if(xuanze == "-")
{
var result = parseInt(number) - parseInt(number2);
} else if (xuanze == "*")
{
var result = parseInt(number) + parseInt(number2);
} else
{
var result = parseInt(number) + parseInt(number2);
}
document.getElementById("fruit").value = result;
}
</script>