Script Categories













Equivalents >>> Degrees Radians.

Use JavaScript to convert Degrees to Radians and vice versa.


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 ra_de() {
var pi = Math.PI;
var ra_de = ((eval(document.Radeg.RADE.value))*(180/pi));
document.Radeg.RADE.value = ra_de;
}
function de_ra() {
var pi = Math.PI;
var de_ra = ((eval(document.Radeg.RADE.value))*(pi/180));
document.Radeg.RADE.value = de_ra;
}
function resetRADE() {
document.Radeg.RADE.value="0";
}
// End -->
</script>
<center>
<FORM name="Radeg" id="Radeg">
<INPUT
TYPE=Button VALUE="Radians to Degrees" onClick="ra_de()"><INPUT TYPE=Button VALUE="Degrees to Radians" onClick="de_ra()"><br>
<INPUT NAME="RADE" TYPE="Text" VALUE="0" SIZE=25></FORM>
</center>

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




©