auto update time in html
timer();
function timer(){
var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()
var sec = currentTime.getSeconds()
if (minutes < 10){
minutes = "0" + minutes
}
if (sec < 10){
sec = "0" + sec
}
var t_str = hours + ":" + minutes + ":" + sec + " ";
if(hours > 11){
t_str += "PM";
} else {
t_str += "AM";
}
document.getElementById('time_span').innerHTML = t_str;
setTimeout(timer,1000);
}
Also in HTML:
- SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
- scrapy get raw html content of selector innerhtml
- center text in a html file
- javascript prevent form submit
- prettier html formatting
- how to create a drop down list in html
- what does html stand for
- html cheat sheet
- editable text box html
- html for an image with a link
- how to insert background image in html
- how to include jquery in html
- mdb input bg
- ubuntu vm workstation 12
- html form tag
- html video autoplay IPHONE
- required form html
- add_theme_support
- how to add an image in html
- bootstrap 4 checkbox
- change text color mid sentence html
- html5 input error message
- materialize cdn
- show timestamp as yyyy mm dd html angular