label=document.getElementById("label")
label.innerHTML="NOT PRINTING"
textarea=document.getElementById("area")
textarea.fixValue=textarea.value
textarea.getValue=function(){return this.value}
textarea.onkeydown=function(){label.innerHTML="PRINTING"}//сокращаем отклик
observer="id=setInterval(function(){"+
"if(textarea.fixValue===textarea.getValue()){label.innerHTML=\"NOT PRINTING\"; return}"+
"label.innerHTML=\"PRINTING\"; textarea.fixValue=textarea.getValue()"+
"}, 1000)"
textarea.addEventListener("focus", function(){eval(observer)})
textarea.addEventListener("blur", function(){clearInterval(id)}) |