I'm picking up to put a watch inside a tag
I have this watch function code that I picked up on the internet
function startTime() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
m = checkTime(m);
s = checkTime(s);
document.getElementById('txt').innerHTML =
h + ":" + m + ":" + s;
var t = setTimeout(startTime, 500);
}
function checkTime(i) {
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}
In this example it shows me to insert the clock in this way
<body onload="startTime()">
<p id="demo"></p>
<div id="txt"></div>
But I want to put in the snippet of code where it says "Timeout" because it is the waiting time of the client for the return of the connection.
<td>0001</td>
<td>11:05</td>
<td>Suporte</td>
<td>Luciana</td>
<td>5292 - J ALVES CONTABIL</td>
<td>Norma</td>
<td>Tempo de espera</td>
Could you help me?