var s = new String; s = document.getElementById("left").innerHTML = secsLeft; var l = s.length; alert(l);