<%
response.Write "<html>"&_
"<head>"&_
"<meta http-equiv=Content-Type content=text/html; charset=gb2312>"&_
"<title>TAIXUN多功能编辑器--计算器</title>"&_
"<link href=Design.css rel=stylesheet TYPE=text/css>"%>
<SCRIPT language=JavaScript>
function computetoedit(obj)
{
return eval(obj.expr.value)
}
function compute(obj)
{obj.expr.value = eval(obj.expr.value)}
var one = '1'
var two = '2'
var three = '3'
var four = '4'
var five = '5'
var six = '6'
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)
{obj.expr.value += string}
</script>
<script event=onclick for=Ok language=JavaScript>
a.value = computetoedit(this.form);
window.returnValue = a.value+"*"+b.value
window.close();
</script>
<script>
function IsDigit()
{
return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script><%
response.Write "</head><body topmargin=0>"&_
"<form NAME=calc>"&_
"<TABLE borderColor=#efefef WIDTH=160 ALIGN=center BORDER=1>"&_
"<TBODY>"&_
"<TR>"&_
"<TD bgColor=#000000 colSpan=4>"&_
"<INPUT 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=12 NAME=expr id=a action='compute(this.form)' ONKEYPRESS='event.returnValue=IsDigit();'>"&_
"<TR>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, seven)' TYPE=button VALUE=' 7 '>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, eight)' TYPE=button VALUE=' 8 '>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, nine)' TYPE=button VALUE=' 9 '>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, divide)' TYPE=button VALUE=' / '>"&_
"<TR>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, four)' TYPE=button VALUE=' 4 '>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, five)' TYPE=button VALUE=' 5 '>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, six)' TYPE=button VALUE=' 6 '> "&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, multiply)' TYPE=button VALUE=' * '>"&_
"<TR>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, one)' TYPE=button VALUE=' 1 '>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, two)' TYPE=button VALUE=' 2 '>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, three)' TYPE=button VALUE=' 3 '>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, minus)' TYPE=button VALUE=' - '>"&_
"<TR>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, decimal)' TYPE=button VALUE=' . '>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, zero)' TYPE=button VALUE=' 0 '>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT TYPE=reset size=3 VALUE=' AC '>"&_
"<TD WIDTH=40 ALIGN=center>"&_
"<INPUT onclick='enter(this.form, plus)' TYPE=button VALUE=' + '>"&_
"<TR ALIGN=center>"&_
"<TD colSpan=4><INPUT TYPE=button id=b onclick=compute(this.form) VALUE=' = '>"&_
"</TR>"&_
"<TR>"&_
"<TD colSpan=4><INPUT NAME=button TYPE=button onClick='javascript:window.close()' VALUE=' 关闭 '> "&_
"<INPUT NAME=Ok TYPE=button id=Ok VALUE=' 确定 '></TR>"&_
"</TBODY>"&_
"</TABLE>"&_
"</form>"&_
"</body>"&_
"</html>"
%>