javascript current hours and minutes code

 DEMO: javascript current hours and minutes

Get Code:

<h4>It is now
<script type=”text/javascript“>
<!–
var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()
if (minutes < 10){
minutes = “0” + minutes
}
document.write(hours + “:” + minutes + ” “)
if(hours > 11){
document.write(“PM”)
} else {
document.write(“AM”)
}
//–>
</script>
</h4>

Source: http://www.tizag.com/

Javascript

  

Önceki

jquery animated link for categories

Sonraki

online youtube video converter websites

Email aboneliği

Esakademi.com'dan iyi ve güzel haberler almak için listeye mailinizi ekleyin