Calculates and returns the arcsine of a number in JavaScript
Description
The following code shows how to calculates and returns the arcsine of a number.
Example
<!DOCTYPE html>
<html>
<body>
<script language="JavaScript">
function doMath() {<!-- ww w . j a va 2s . c om-->
var inputNum = document.form1.input.value;
var result = Math.asin(inputNum);
document.form1.answer.value = result;
}
</script>
<form name=form1>
This example calculates the arcsine of the entered number. <br>
<br> Enter Number: <input type="text" name="input" size=10>
<input type="button" value="Calculate" onClick='doMath()'> <br>
The arcsin is: <input type="text" name="answer" size=10>
</form>
</body>
</html>