I've been attempting to include a small feature on my website that displays the running seconds, but for some reason my JavaScript function isn't working. Strangely, it's not throwing any errors either. Here's the code I'm using:
function stoptime() {
let count = 0;
count = count + 1;
stop = document.getElementById("time");
stop.iinnerHTML = count.value;
setInterval(stopt ime, 1000);
I tried using this code with the document.write function, but instead of incrementing the count ++ value, it just displayed numerous single values of count. So I attempted to use innerHtml, but it still didn't work.
Could you please advise on what might be causing this issue and provide the correct code?