Script Categories

Calculators >>> Square Root.

Allows you to find the value of a number squared or that number's square root.

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

<script language="javascript" type="text/javascript">
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- 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 -->
<table border=1>
<input type=text name=num size=10>
<input type=button value="Sq. Root" onClick="sqRt(this.form)"><br>
<input type=button value="Square It" onClick="sqIt(this.form)">
<input type=text name=answer size=15><br>
<input type=button value="<-- copy back" onClick="this.form.num.value = this.form.answer.value">

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!).

Bitcoin Dice Site . cashadvance-loans