Character Counts / instant

0

The code

(function () {
  var div, txt;
  div = document.getElementById('charcount');
  txt = document.getElementById('inputfield');
  txt.onkeyup = function () {
    div.innerHTML = txt.value.length;
  };
  txt.focus();
})();