The source
<FORM>
<TABLE BORDER=4 CELLPADDING=10 >
<TR ALIGN=CENTER BGCOLOR=c0c0c0>
<TD COLSPAN="5"><B>C A L C U L A T
O R</B></TD></TR>
<TR BGCOLOR="#E2E2E2" ALIGN=CENTER>
<TD><INPUT type=text name=first value=1
size=7></TD>
<TD><INPUT type=button value=" + "
onClick="this.form.result.value=parseFloat(this.form.first.value) + parseFloat(this.form.second.value)">
<INPUT type=button value=" - " onClick="this.form.result.value=parseFloat(this.form.first.value)
- parseFloat(this.form.second.value)">
<INPUT type=button value=" * " onClick="this.form.result.value=parseFloat(this.form.first.value)
* parseFloat(this.form.second.value)">
<INPUT type=button value=" / " onClick="if(parseFloat(this.form.second.value)!=0){this.form.result.value=parseFloat(this.form.first.value)
/ parseFloat(this.form.second.value)}else{this.form.result.value='Error'}">
</TD>
<TD><INPUT type=text value=1 name=second
size=7></TD>
<TD>= </TD>
<TD><INPUT type=TEXT value=" 2 " name=result
size=7></TD>
</TR>
</TABLE>
</FORM>
|