Script Categories













Calculators >>> X By X.

This is a very simple, very limited calculator that only does multiplication. This script is perfect if multiplication is all you are looking for.

Multiply By

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function  doMath() {
var one = eval(document.theForm.elements[0].value)
var two = eval(document.theForm.elements[1].value) 
var prod = one  *   two
alert("The product of "  +  one  +  " and "  + 
two 
+  " is "  +  prod  +  ".")
}
// End -->
</SCRIPT>
<nobr>
<FORM NAME="theForm">
Multiply
<INPUT TYPE="text">
By
<INPUT TYPE="text">
<INPUT
TYPE="button" VALUE="Show result" onClick="doMath()">
</FORM>
</nobr>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).

R7


©