1、描述
此方法返回一个数字的弧度反正弦值。asin方法对于x在-1和1之间返回一个介于-pi/2和pi/2弧度之间的数值。如果x的值超出这个范围,则返回NaN。
2、语法
它的语法如下:
Math.asin( x ) ;
3、参数
x:一个数字。
4、返回值
返回一个数字弧度反正弦值。
5、使用示例
<html>  
   <head>
      <title>JavaScript Math asin() Method</title>
   </head>
   
   <body>
      <script type = "text/javascript">
         var value = Math.asin(-1);
         document.write("-1 : " + value );
         
         var value = Math.asin(null);
         document.write("<br />null : " + value ); 
         
         var value = Math.asin(20);
         document.write("<br />20 : " + value ); 
         
         var value = Math.asin("string");
         document.write("<br />string : " + value ); 
      </script>      
   </body>
</html>6、输出
-1 : -1.5707963267948966 null : 0 20 : NaN string : NaN