错误提示:
ErrorNotification.js:125 Cannot assign Ctrl-Shift-Down to io.emmet.decrement_number_by_1. It is already assigned to edit.lineDown
<script type="text/javascript">
function count(){
var a1=parseInt(document.getElementById('txt1').value);
var a2=parseInt(document.getElementById('txt2').value);
var guize=document.getElementById('select').value;
var result=0;
switch(guize){
case '+':
result=a1+a2;
break;
case '-':
result=a1-a2;
break;
case '*':
result=a1*a2;
break;
default:
result=a1/a2;
break;
}
document.getElementById('fruit').innerHTML=result.toString();
}
</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>
慕粉3591791
相关分类