标签:
<script type ="text/javascript">
var num1 = prompt("请输入第一个数" ",");
var num2= prompt("请输入第二个数" ",");
var method= prompt("请输入运算符" ",");
functiona(){
swich(method){
case " * ":
alert(num1 * num2);
case " / ":
alert(num1 / num2);
case " + ":
alert(num1 + num2);
case " - ":
alert(num1 - num2);
}
}
<script/>
<input name = "btn" type = "butten" value ="计算机" onclick "a()"/>
标签:
原文地址:http://www.cnblogs.com/Cheng1367959758/p/4912674.html