I wrote some very simple code the should represent a stopwatch with two buttons where clicking 'Start' should start counting upwards from 0 with 1 second delay.
However, when I click nothing changes. Where is my mistake?
"use strict";
var s = 1;
function mf() {
setInterval(function() {
document.getElementById("#sw").innerText = ++s;
}, 1000);
}
<div id="sw">0</div>
<input type="button" value="Start" name="start" onlick="mf" />
<input type="button" value="Stop" name="stop" />