Начало
Калькуляторы
Калькулятор Квадратного корня
Позволяет Вам считать ценность числа согласованной или квадратный корень числа.
JavaScript Calculators: калькулятор квадратного корня
<!-- TWO STEPS TO INSTALL SQUARE ROOT CALCULATOR: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin function sqRt(form) { var number = form.num.value; var ans = Math.sqrt(number); form.answer.value = ans; } function sqIt(form) { var number = form.num.value; var ans = eval(number * number); form.answer.value = ans; } // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <center> <form> <table border=1> <tr> <td> <input type=text name=num size=10> </td> <td> <input type=button value="Sq. Root" onClick="sqRt(this.form)"><br> <input type=button value="Square It" onClick="sqIt(this.form)"> </td> <td> <input type=text name=answer size=15><br> <input type=button value="<-- copy back" onClick="this.form.num.value = this.form.answer.value"> </td> </tr> </table> </form> </center> <!-- Script Size: 1.36 KB -->