1 2 var log_panel = null;3 4 window.addEventListener('load', init, true);5 6 7 function init() {8 log_panel = document.getElementById('log');9 10 var p1 = document.getElementById('parte1');11 var p2 = document.getElementById('otraparte');12 13 p1.contentEditable=true;14 p2.contentEditable=true;15 16 p1.addEventListener('change', function() {log('part1 change');}, true);17 p1.addEventListener('keyup', function() {log('part1 keyup');}, true);18 19 20 21 }22 23 function log(txt) {24 if (log_panel != null) log_panel.innerHTML += txt+'<br>';25 }
Enlace
El enlace para compartir es: