Начало
Эквиваленты
Степени к Радианам
Используйте JavaScript, чтобы преобразовать Степени в Радианы и наоборот.
JavaScript Equivalents: Степени к Радианам
<!-- TWO STEPS TO INSTALL DEGREES TO RADIANS: 1. Paste the specified coding into the HEAD of your HTML document 2. Put the last code 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 ra_de() { var pi = Math.PI; var ra_de = ((eval(document.forms[0].RADE.value))*(180/pi)); document.forms[0].RADE.value = ra_de; } function de_ra() { var pi = Math.PI; var de_ra = ((eval(document.forms[0].RADE.value))*(pi/180)); document.forms[0].RADE.value = de_ra; } function resetRADE() { document.forms[0].RADE.value="0"; } // End --> </SCRIPT> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <CENTER> <FORM> <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> </BODY> </CENTER> <!-- Script Size: 1.26 KB -->