how come I show the answer from this html code by these user input number?

Maxi

New member
<HTML>
<HEAD>
<TITLE>Simple Calculator</TITLE>
<SCRIPT language="JavaScript">
function simpleCalculator(theForm)
{
if(confirm("Calculate?"))
{
theForm.answer.value=eva(theForm.expression.value)
return(eva(theForm.expression.value))
}
else
{
alert("NO CALCULATION DONE!!!!!")
}
}
</SCRIPT>
</HEAD>
<BODY>
<H1>Simple Calculator</H1>
<FORM>
<B>Expression:
<BR>
<INPUT TYPE="text"
NAME="expression"
SIZE=15>
<INPUT TYPE="button"
VALUE="Calculate"
onClick="simpleCalculator(this.Form)">

<BR>
Result:
<BR>
<INPUT TYPE="text"
NAME="answer"
SIZE=15>
<BR>
</B>
</FORM>
</BODY>
</HTML>
sorry i mean why i cannot get answer
 
Back
Top