点等号不会出现结果
<!DOCTYPE html>
<html>
<head>
<title> 事件</title>
<script type="text/javascript">
function count(){
var reason;
var first= document.getElementById("txt1").value ;
var second= document.getElementById("txt2").value;//函数问题
var select= document.getElementById("select").value;
switch(select){
case "+": //冒号问题 引号问题
reason=parseFloat(first) + parseFloat(second) ;
case "-":
reason=parseFloat(first) - parseFloat(second);
case "*":
reason=parseFloat(first) * parseFloat(second);
case "/":
reason=parseFloat(first) / parseFloat(second);
}
document.getElementById("fruit")=reason; //输出问题
</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>