Set Hours : Date Set « Date Time « JavaScript DHTML






Set Hours

    
<html>
<body>
<button onclick="var myDate = new Date(); 
                 myDate.setHours(12); 
                 alert(myDate);">Date: set Hours</button>
</body>
</html>

    
      
      








Related examples in the same category

1.Set Date
2.Set Full Year
3.Set Milliseconds
4.Set Minutes
5.Set Month
6.Set Seconds
7.Set Time
8.Set Year