Get Minutes past the hour - Javascript Date Operation

Javascript examples for Date Operation:Minute

Description

Get Minutes past the hour

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
function alert_minutes() {//from w  w w  .jav  a  2s .  c o  m
    var d = new Date();
    console.log('Minutes past the hour: ' + d.getMinutes());
}

      </script> 
   </head> 
   <body> 
      <button onclick="alert_minutes()">Click Me</button>  
   </body>
</html>

Related Tutorials