Script Categories













Calculators >>> Sine.

Enter the opposite and hypotenuse angle values and JavaScript will solve the sine angle for you.

Opposite Angle Hypotenuse Angle Sine Angle

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 calcsin(form) {
var opp = eval(form.opp.value);
var hyp = eval(form.hyp.value);
form.sin.value = opp/hyp;
}
// End -->
</script>
<form>
<table border=3 cellspacing=2 cellpadding=5>
<tr>
<td
align=center><i>Opposite Angle</i></td>
<td
align=center><i>Hypotenuse Angle</i></td>
<td
align=center><i>Sine Angle</i></td>
</tr>
<tr>
<td
align=center><input type=text name=opp size=15></td>
<td
align=center><input type=text name=hyp size=15></td>
<td
align=center><input type=text name=sin size=15></td>
</tr>
<tr>
<td
colspan=3 align=center><input type=button value="Calculate!" onclick="calcsin(this.form)"></td>
</tr>
</table>
</form>

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




©