<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
input{
width:25;
}
</style>
<script>
var rs="";
function cal(op)
{
if(op=="r")
{
alert(eval(rs));
rs="";
}
else
rs=rs+op;
}
</script>
</HEAD>
<BODY>
<TABLE>
<TR>
<TD><input type=button value=1 οnclick=cal(1)></TD>
<TD><input type=button value=2 οnclick=cal(2)></TD>
<TD><input type=button value=3 οnclick=cal(3)></TD>
</TR>
<TR>
<TD><input type=button value=4 οnclick=cal(4)></TD>
<TD><input type=button value=5 οnclick=cal(5)></TD>
<TD><input type=button value=6 οnclick=cal(6)></TD>
</TR>
<TR>
<TD><input type=button value=+ οnclick=cal("+")></TD>
<TD><input type=button value=- οnclick=cal("-")></TD>
<TD><input type=button value="=" οnclick=cal("r")></TD>
</TR>
</TABLE>
</BODY>
</HTML>