JavaScript Reference/Javascript Methods/setUTCHours — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:22, 26 мая 2010
"setUTCHours()" Example
<source lang="javascript">
<html> <body> <button onclick="var myDate = new Date(); myDate.setUTCHours(11); alert(myDate);">SETUTCHOURS</button> </body> </html>
</source>
"setUTCHours()" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |Date | +----------------+--------------------------------------------------------------+
</source>
"setUTCHours()" Syntax, Parameters and Note
<source lang="javascript">
Note: Uses UTC time to set the hour.
Syntax:
dateName.setUTCHours(param1, param2, param3, param4) Parameters:
param1 Required; the hour. Value: 0 to 23. param2 Optional; the minute. Value: 0 to 59. param3 Optional; the seconds. Value: 0 to 59. param4 Optional; the milliseconds elapsed in the current second. Value: 0 to 999. </source>