JavaScript Reference/Javascript Methods/getDay

Материал из Web эксперт
Перейти к: навигация, поиск

"getDay()" Example

    
<html>
<body>
<button onclick="var myDate = new Date(); alert(myDate.getDay());">
get day
</button>
</body>
</html>



"getDay()" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |Date                                                          |
+----------------+--------------------------------------------------------------+



"getDay()" Syntax, Parameters and Note

Note:
Returns the numeric day of the week. 
Return values: 
0 to 6, 
0 representing Sunday and 6 representing Saturday.
    
Syntax:
    
dateName.getDay()