目录

constructor

描述 (Description)

它返回对创建实例原型的数组函数的引用。

语法 (Syntax)

其语法如下 -

RegExp.constructor

返回值 (Return Value)

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

例子 (Example)

请尝试以下示例程序。

<html>
   <head>
      <title>JavaScript RegExp constructor Property</title>
   </head>
   <body>
      <script type="text/javascript">
         var re = new RegExp( "string" );
         document.write("re.constructor is:" + re.constructor); 
      </script>
   </body>
</html>

输出 (Output)

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