I have something like this:
var stopwatch = function (item) {
window.setInterval(function () {
item.innerHtml = myInteger++;
}, 1000);
}
This code was supposed to display myInteger, but it is not updating values of item. Why (item is a div with text inside)?
innerHTMLnotinnerHtml. Supposingitemis a DOM Element object.