计算器排html页⾯,简易计算器html页⾯代码简易计算器
content=no-cache>
content=zh-cn>
//document.οnkeyup=function Fun(){alert(event.keyCode);}
function computetoedit(obj)
{
return eval_pr.value)
}
function compute(obj)
{pr.value =
eval_pr.value)}
var one = '1'
var two = '2'
var three = '3'
var four = '4'
var five = '5'
var six = '6'
网页计算器html代码var seven = '7'
var eight = '8'
var nine = '9'
var zero = '0'
var plus = '+'
var minus = '-'
var multiply = '*'
var divide = '/'
var decimal = '.'
function enter(obj, string)
{pr.value +=
string}
FONT-SIZE: 9pt
}
a.value = computetoedit(this.form);
window.close();
function IsDigit()
{
return ((event.keyCode >= 48)
&& (event.keyCode <=
57));
}
οncοntextmenu=urnValue=false>
border=1>
colSpan=4>
style="BORDER-RIGHT: #000000 1px inset; BORDER-TOP: #000000 1px inset; FONT-SIZE: 18pt; BORDER-LEFT: #000000 1px inset; COLOR:
#ffff00; BORDER-BOTTOM: #000000 1px inset; BACKGROUND-COLOR: #000000"
size=14 name=expr id=a action="compute(this.form)"
ONKEYPRESS="urnValue=IsDigit();">
οnclick="enter(this.form, seven)" type=button value=" 7
">
οnclick="enter(this.form, eight)" type=button value=" 8
">
οnclick="enter(this.form, nine)" type=button value=" 9
">
οnclick="enter(this.form, divide)" type=button value=" /
">
οnclick="enter(this.form, four)" type=button value=" 4
">
οnclick="enter(this.form, five)" type=button value=" 5
">
οnclick="enter(this.form, six)" type=button value=" 6
">
οnclick="enter(this.form, multiply)" type=button value=" *
">
οnclick="enter(this.form, one)" type=button value=" 1
">
οnclick="enter(this.form, two)" type=button value=" 2 ">
οnclick="enter(this.form, three)" type=button value=" 3 ">
οnclick="enter(this.form, minus)" type=button value=" -">
οnclick="enter(this.form, decimal)" type=button value=" . ">
οnclick="enter(this.form, zero)" type=button value=" 0 ">
type=reset size=3 value=" AC">
οnclick="enter(this.form, plus)" type=button value=" + ">
colSpan=4>
οnclick=compute(this.form) type=button
value=" =

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。