目录

constructor

描述 (Description)

Javascript boolean constructor()方法返回对创建实例原型的Boolean函数的引用。

语法 (Syntax)

使用以下语法创建布尔构造函数()方法。

boolean.constructor()

返回值 (Return Value)

返回创建此对象实例的函数。

例子 (Example)

请尝试以下示例。

<html>
   <head>
      <title>JavaScript constructor() Method</title>
   </head>
   <body>
      <script type="text/javascript">
         var bool = new Boolean( );
         document.write("bool.constructor() is:"+bool.constructor); 
      </script>
   </body>
</html>

输出 (Output)

bool.constructor() is : function Boolean() { [native code] }
↑回到顶部↑
WIKI教程 @2018