Начало
Калькуляторы
Умножить х на х
Это - очень ограниченный и очень простой калькулятор - который только делает умножение.
Multiply
By
JavaScript Calculators: умножить х на х
<!-- TWO STEPS TO INSTALL MULTIPLY X BY X: 1. Paste the designated code into the BODY of your HTML document 2. Put the last script into the BODY of your HTML document --> <!-- STEP ONE: Copy this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- 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> <!-- STEP TWO: Put this script into the BODY of your HTML document --> <BODY> <CENTER> <FORM NAME="theForm"> Multiply <INPUT TYPE="text"> By <INPUT TYPE="text"> <INPUT TYPE="button" VALUE="Show result" onClick="doMath()"> </FORM> </CENTER> <!-- Script Size: 0.98 KB -->