get local time second javascript heure temps réel
<body>
<p>Il est <span id="time"></span>.</p>
<button id="stop">Stop time</button>
<script>
let hour = document.getElementById("time");
let stop = document.getElementById("stop");
let realTime = setInterval(clock, 1000);
function clock(){
let d = new Date();
hour.innerHTML = d.toLocaleTimeString();
}
stop.addEventListener ("click", arret);
function arret() {
clearInterval(realTime);
}
</script>
</body>
Also in JavaScript:
- set iframe height and width by js
- locak storage for table\ js
- angular valuechanges get id
- get youtube embed code from url
- express get host url
- react detect cursor
- add class to body javascript
- javascript replace all occurrences of string
- regex only uppercase letters js
- react router dom push
- node js async delay
- convert to json python
- random number js
- jquery scroll to position
- devexpress winforms get readonly colour for current themes
- check uncek react-bootstrap-table reactjs
- how to check if value is undefines if condition jquery
- angular access current scope from console
- how to get state value from history react
- js how to see console day tomorrow
- express middleware pass parameter
- substr
- ng-class equivalent in react
- how to check if a string is alphabetic in javascript