Is there a way to limit the decimal points in this script?
<HTML>
<HEAD>
<TITLE>Calculator</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function CalculateSum(Atext, Btext, form)
{
var A = parseFloat(Atext);
var B = parseFloat(Btext);
form.Answer.value = A/(B*B);
}
</SCRIPT>
</HEAD>
<BODY>
<P><FONT SIZE="+2">Calculator</FONT></P>
<FORM NAME="Calculator" METHOD="post">
<P>Text A: <INPUT TYPE=TEXT NAME="input_A" SIZE=5></P>
<P>Text B: <INPUT TYPE=TEXT NAME="input_B" SIZE=5></P>
<P><INPUT TYPE="button" VALUE="Calculate" name="AddButton" onClick="CalculateSum(input_A.value,input_B.value, this.form)"></P>
<P><input type="reset" name="reset" value="Reset" id="reset" />
<P>Answer = <INPUT TYPE=TEXT NAME="Answer" SIZE=12></P>
</FORM>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE>Calculator</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function CalculateSum(Atext, Btext, form)
{
var A = parseFloat(Atext);
var B = parseFloat(Btext);
form.Answer.value = A/(B*B);
}
</SCRIPT>
</HEAD>
<BODY>
<P><FONT SIZE="+2">Calculator</FONT></P>
<FORM NAME="Calculator" METHOD="post">
<P>Text A: <INPUT TYPE=TEXT NAME="input_A" SIZE=5></P>
<P>Text B: <INPUT TYPE=TEXT NAME="input_B" SIZE=5></P>
<P><INPUT TYPE="button" VALUE="Calculate" name="AddButton" onClick="CalculateSum(input_A.value,input_B.value, this.form)"></P>
<P><input type="reset" name="reset" value="Reset" id="reset" />
<P>Answer = <INPUT TYPE=TEXT NAME="Answer" SIZE=12></P>
</FORM>
</BODY>
</HTML>