欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

JavaScript constructor 屬性

定義和用法

constructor 屬性返回對(duì)創(chuàng)建此對(duì)象的 Date 函數(shù)的引用。

語(yǔ)法

object.constructor

實(shí)例

在本例中,我們將展示如何使用 constructor 屬性:

<script type="text/javascript">

var test=new Date();

if (test.constructor==Array)
{
document.write("This is an Array");
}
if (test.constructor==Boolean)
{
document.write("This is a Boolean");
}
if (test.constructor==Date)
{
document.write("This is a Date");
}
if (test.constructor==String)
{
document.write("This is a String");
}

</script>

輸出:

This is a Date

TIY

TIY

constructor
在本例中,我們將展示如何使用 constructor 屬性。