JavaScript Date constructor egenskap
- Föregående sida constructor
- Nästa sida getDate()
- Åter till föregående nivå JavaScript Date referens manual
Definition and usage
In JavaScript,constructor
The property returns the constructor of the object.
The return value is a reference to the function, not the name of the function:
For JavaScript dates, the constructor property returns:function Date() { [native code] }
For JavaScript numbers, the constructor property returns:function Number() { [native code] }
For JavaScript strings, the constructor property returns:function String() { [native code] }
Instance
The constructor property returns the constructor of the date:
var d = new Date();
Syntax
Date.constructor
Technical details
Return value: | function Date() { [native code] } |
---|---|
JavaScript version: | ECMAScript 1 |
Webbläsarstöd
Egenskaper | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
constructor | Stöd | Stöd | Stöd | Stöd | Stöd |
Relaterade sidor
Tutorial:JavaScript-datum
Tutorial:JavaScript-datumformat
Tutorial:JavaScript-objektkonstruktorn
- Föregående sida constructor
- Nästa sida getDate()
- Åter till föregående nivå JavaScript Date referens manual