Javascript-date-constructor

提供:Dev Guides
移動先:案内検索

JavaScript Dateコンストラクタープロパティ

説明

Javascript date constructor プロパティは、インスタンスのプロトタイプを作成した配列関数への参照を返します。

構文

その構文は次のとおりです-

date.constructor

戻り値

このオブジェクトのインスタンスを作成した関数を返します。

次の例を試してください。

<html>
   <head>
      <title>JavaScript Date constructor Property</title>
   </head>

   <body>
      <script type = "text/javascript">
         var dt = new Date();
         document.write("dt.constructor is : " + dt.constructor);
      </script>
   </body>
</html>

出力

dt.constructor is: function Date() { [native code] }