caculator.html
簡單的電腦
style.css
#my_table
{
text-align: center;
border-style: none;
}
func.js
var one='1' ,two='2' ,three='3' ,four='4' ;
var five='5' ,six='6' ,seven='7' ,eight='8' ;
var nine='9' ,zero='0' ;
var plus='+' ,minus='-',multiply='*' ,divide='/' ,decimal='.' ,percent='%' ,character='-';
function clearReset(obj)
{
obj.result.value=" ";
}
function enter(obj,String)
{
obj.result.value+=String;
}
function compute(obj)
{
obj.result.value=eval( obj.result.value);
}