web计算器代码详解
最新web计算器代码详解
function getNumidInput大学肄业
var num;
ElementByIdidInput.value; ifisNaNnum
alert“不是数字";
el
num=parIntnum;
return num;
function getOpt
var opt="+";
forvar i=1;ii++
ElementById"opt"+i.value; break;sleep
return opt;
function putenum1Para,num2Para,optPara
var result=0;
switchoptParavivian leigh
against是什么意思ca "+":
with himresult=num1Para+num2Para;
英语四级阅读理解
break;
ca "-":
pricelist
result=num1Para-num2Para;
break;
ca "*":
result=num1Para*num2Para;
break;
ice cream sandwich
ca "/":
ifnum2Para!=0
result=num1Para/num2Para;
break;
fyb
白雪公主七个小矮人default:
result="不合法运算符";
return result;
function puteGo
var num1,num2,opt;
num1=getNum"num1";
num2= getNum"num2";
opt=getOpt;
/*
*/