JavaScript - Math toSource 方法



描述

此方法返回字串“Math”。但此方法不適用於 IE。

語法

其語法如下:

Math.toSource() ;

返回值

返回字串“Math”。

示例

嘗試以下示例程式。

<html>   
   <head>
      <title>JavaScript Math toSource() Method</title>
   </head>
   
   <body>      
      <script type = "text/javascript">
         var value = Math.toSource( );
         document.write("Value : " +  value );
      </script>      
   </body>
</html>

輸出

Value : Math 
javascript_math_object.htm
廣告