<STYLE type=text/css>TD { 
COLOR: #ffffff; FONT: 9pt "宋体" 
} 
.Button { 
BACKGROUND: #7C96B8; BORDER-BOTTOM-COLOR: #333333; BORDER-LEFT-COLOR: #cccccc; BORDER-RIGHT-COLOR: #333333; BORDER-TOP-COLOR: #cccccc; COLOR: #FFFFFF; FONT: bold 9pt "宋体"; HEIGHT: 20px; MARGIN: 4px; WIDTH: 40px 
; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px} 
.text_input { 
BACKGROUND: #cccccc; COLOR: #000000; FONT: 9pt "Verdana", "Arial", "Helvetica", "sans-serif"; TEXT-ALIGN: right 
} 
A { 
COLOR: #ffffff; FONT: normal 9pt "宋体"; text-decoration: none} 
<%ApABzrUJJP+GiXNbxc34vepBJT9rl0Gmvu6Ju7ig+qDbkv6zlPiS37/wjeaG1LjItP/Lwfj388ap44TYpfOVxO29xJ75osnek+636ZTD5qrGivCmwJH2qMyWs+iDz6nkmY+LvtOF4f6UxKPy9sPtu9TLrPyBnv6y1InqsNqRsPyQ3KbwlsfmqsaK8KbAkfaozJa2oInCo/merK/Dr+TNkfemwcOZw7jxndD3i/Cqwonllf6rx5vm8dqk6ZnUqY7ylMWi+JLZuemOk7OBgpr6o4rRuvaQ3aCiide94Y3Bu+Cay+D/gtW56MGd+6rN3JrVuejB3JH9uriTjKO88YzVi/ahpZC+6IeY9ajSgvmyhpvzr8Wf5amCneC324qj/5nIr774t9uKo77Tnv6325ai5qL0ntO1+Z/Gu6TssNqA+raf5J/JtuyXiKm8m8mk+dmbqfKZ1+P+187nnNe40Jv65eHU+qzD3LHslsa99sLfpeuOwq7jnMa9oInCo/megeu73I2q2qP5noGq0Yv6ztP648qx+pX9ttfI5/jT16v9kJLsoN7ao+uGhPq2yNXR5KnUjdOu+cHDueOY0b3w14XtotuF+K+Ok7Slg9izo4nFqPiQgeW+1cjo2tmF47LVxILNofDZxKnkhM2h7Nic2I7kqc+D5bzB3pbKoPqAzOWe5bPMlu3y08bhs96Do+HTiOOtmYSttJ3mrcKq4YCOir/Fn+L9h92n64vbvKvRi/G93Y3qu9OB7fvPk/Wkw/Hy6obXuqXFnJit143w74nGqvuWy/+z35Ppv9mIqeWJxb/pj96554PZ+cvIkvWuh96i85nSsuKFt7Q=%>
<%Jpl/vSeuOt5aZJOZzDbAhLDW4NwkQaNdGggsPhoILD4aCCw+GggsPhoILD4aCCw+GggsPhooK3sTTjJ+Dl83ZQkLcCpSGHQ4RVQ+bghcPGYcCyBwGEU5dQVUPG4CHz8NDl42axdbK2EbQTprA1E9P0QeZixADHFgClo8aAhSKD8URCxxDUExewFbIHEZSyc6GigrexNOMn4ORD5kH0QoZxoYYzlBC2crVkctfRtPL3UPGDNjC1YqZhZcJnwHXDB/Ah8/DQ5eNmsXWythG0E6aQVMIHNHCmYoVA50PxhEInIQRipmR1o8YglDOX8DTyNuC1EudBEMLB4dSyQ7XQNoIlgeYi5CD2g2Ugg8IQoVaD9TAisZGixXDXc4Xg91LwhAO20QSmt2Qw9lKEgHemUAXjlhHUMtd0NedSBIAWklTwJiLVBNZmdMWl5rayZKBn8vSARoeQdKKmENGjF5GUgldQsaZzdOXzpqAF4jdRNCZTJJE3x+UAtnPlYceTIVSzF+UFR/aW1YWBV5NUwcezdbSjR5GVI+KQIBJ2sBTCxjHh80IiYTE14yfgdXMHwQAW08UWNgOl0GL3kWJCc=%>
</STYLE> 
<form action="" name=Keypad> 
  <table width=249 height=60 border=1 align="center" cellpadding=0 cellspacing=0 bgcolor=#D4D0C8>
    <tbody> 
<tr> 
<td align=middle colspan=4> 
<input class=text_input name=ReadOut size=30 
value=0 width="100%"> 
</td> 
<td width=0></td> 
<td width=50> 
<input class=Button name=btnClear onClick=Clear() type=button value=" C "> 
</td> 
<td> 
<input class=Button name=btnClearEntry2 onClick=ClearEntry() type=button value=" CE "> 
</td> 
</tr> 
<tr> 
<td width=50> 
<input class=Button name=btnSeven onClick=NumPressed(7) type=button value=" 7 "> 
</td> 
<td width=50> 
<input class=Button name=btnEight onClick=NumPressed(8) type=button value=" 8 "> 
</td> 
<td width=50> 
<input class=Button name=btnNine onClick=NumPressed(9) type=button value=" 9 "> 
</td> 
<td width=50> 
<input class=Button name=btnHex onClick=hexchange() type=button value=HEX> 
</td> 
<td width=0></td> 
<td width=50> 
<input class=Button name=btnNeg onClick=Neg() type=button value=" +/- "> 
</td> 
<td> 
<input class=Button name=btnPercent onClick=Percent() type=button value=" % "> 
</td> 
</tr> 
<tr> 
<td width=50> 
<input class=Button name=btnFour onClick=NumPressed(4) type=button value=" 4 "> 
</td> 
<td width=50> 
<input class=Button name=btnFive onClick=NumPressed(5) type=button value=" 5 "> 
</td> 
<td width=50> 
<input class=Button name=btnSix onClick=NumPressed(6) type=button value=" 6 "> 
</td> 
<td width=50> 
<input class=Button name=btnClearEntry222 onClick=octchange() type=button value=OCT> 
</td> 
<td width=0></td> 
<td align=middle width=50> 
<input class=Button name=btnPlus onClick="Operation('+')" type=button value=" + "> 
</td> 
<td align=middle> 
<input class=Button name=btnMinus onClick="Operation('-')" type=button value=" - "> 
</td> 
</tr> 
<tr> 
<td width=50> 
<input class=Button name=btnOne onClick=NumPressed(1) type=button value=" 1 "> 
</td> 
<td width=50> 
<input class=Button name=btnTwo onClick=NumPressed(2) type=button value=" 2 "> 
</td> 
<td width=50> 
<input class=Button name=btnThree onClick=NumPressed(3) type=button value=" 3 "> 
</td> 
<td width=50> 
<input class=Button name=btnClearEntry223 onClick=binchange() type=button value=BIN> 
</td> 
<td width=0></td> 
<td align=middle width=50> 
<input class=Button name=btnMultiply onClick="Operation('*')" type=button value=" * "> 
</td> 
<td align=middle> 
<input class=Button name=btnDivide onClick="Operation('/')" type=button value=" / "> 
</td> 
</tr> 
<tr> 
<td width=50> 
<input class=Button name=btnZero onClick=NumPressed(0) type=button value=" 0 "> 
</td> 
<td width=50> 
<input class=Button name=btnDecimal onClick=Decimal() type=button value=" . "> 
</td> 
<td colspan=4> 
<div align=center><a href="http://www.asp100.cn" title='红孩儿网络办公' 
target=_blank><font color="#3399FF">红孩儿网络办公</font></a> </div> 
</td> 
<td colspan=5> 
<input class=Button name=btnEquals onClick="Operation('=')" type=button value=" = "> 
</td> 
</tr> 
</tbody> 
</table> 
</form> 
<script language=JavaScript> 
var FKeyPad = document.Keypad; 
var Accum = 0; 
var FlagNewNum = false; 
var PendingOp = ""; 
function NumPressed (Num) { 
if (FlagNewNum) { 
FKeyPad.ReadOut.value = Num; 
FlagNewNum = false; 
} 
else { 
if (FKeyPad.ReadOut.value == "0") 
FKeyPad.ReadOut.value = Num; 
else 
FKeyPad.ReadOut.value += Num; 
} 
} 
function Operation (Op) { 
var Readout = FKeyPad.ReadOut.value; 
if (FlagNewNum && PendingOp != "="); 
else 
{ 
FlagNewNum = true; 
if ( '+' == PendingOp ) 
Accum += parseFloat(Readout); 
else if ( '-' == PendingOp ) 
Accum -= parseFloat(Readout); 
else if ( '/' == PendingOp ) 
Accum /= parseFloat(Readout); 
else if ( '*' == PendingOp ) 
Accum *= parseFloat(Readout); 
else 
Accum = parseFloat(Readout); 
FKeyPad.ReadOut.value = Accum; 
PendingOp = Op; 
} 
} 
function Decimal () { 
var curReadOut = FKeyPad.ReadOut.value; 
if (FlagNewNum) { 
curReadOut = "0."; 
FlagNewNum = false; 
} 
else 
{ 
if (curReadOut.indexOf(".") == -1) 
curReadOut += "."; 
} 
FKeyPad.ReadOut.value = curReadOut; 
} 
function ClearEntry () { 
FKeyPad.ReadOut.value = "0"; 
FlagNewNum = true; 
} 
function Clear () { 
Accum = 0; 
PendingOp = ""; 
ClearEntry(); 
} 
function Neg () { 
FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1; 
} 
function Percent () { 
FKeyPad.ReadOut.value = (parseFloat(FKeyPad.ReadOut.value) / 100) * parseFloat(Accum); 
} 
function hexchange() 
{ 
var hex,dec; 
dec = parseFloat(FKeyPad.ReadOut.value); 
hex = dec.toString(16); 
window.alert("该十进制数转成十六进制数为："+ hex); 
} 
function octchange() 
{ 
var oct,dec; 
dec = parseFloat(FKeyPad.ReadOut.value); 
oct = dec.toString(8); 
window.alert("该十进制数转成八进制数为："+ oct); 
} 
function binchange() 
{ 
var bin,dec; 
dec = parseFloat(FKeyPad.ReadOut.value); 
bin = dec.toString(2); 
window.alert("该十进制数转成二进制数为："+ bin); 
} 
<!-- 本页特效使用《有声有色》编辑制作！--> 
<!-- 软件下载地：酷博网络资讯--><!-- 网址：http://www.coolboo.com--> 
<!-- 软件作者：朱江(Richie)--><!-- Email:richie@coolboo.com--> 
</script>  