javascript get clock time in auto counter up
<html>
<head>
<title>(Type a title for your page here)</title>
<script type="text/javascript">
function display_c(){
var refresh=1000; // Refresh rate in milli seconds
mytime=setTimeout('display_ct()',refresh)
}
function display_ct() {
var x = new Date()
document.getElementById('ct').innerHTML = x;
display_c();
}
</script>
</head>
<body onload=display_ct();>
<span id='ct' ></span>
</body>
</html>function display_ct() {
var x = new Date()
var x1=x.getMonth() + 1+ "/" + x.getDate() + "/" + x.getYear();
x1 = x1 + " - " + x.getHours( )+ ":" + x.getMinutes() + ":" + x.getSeconds();
document.getElementById('ct').innerHTML = x1;
display_c();
}
Also in JavaScript:
- React import image with url
- function inside function javascript
- binaryserachindex javascript
- div click outside to hide javascript
- scroll to element in scrollable div
- how to remove react icon from tab
- json introduction
- jquery label with text
- javascript map return array with distinc values
- uninstalling npm modules from node.js
- webpack proxy
- check if number appears odd number of times in array javascript
- js combine 2 array to object key value
- react native spinkit
- make welcome message and channel discord.js
- js code to run hello world
- javascript trigger click on element
- jquery edit iframe content
- laravel return response json
- get file extension of path extendscript
- javascript Sum of a sequence
- check a checkbox jquery
- bodyparser express
- javascript parseint string with comma