<script> var gKeyDownChild = 0, gKeyPressChild = 0, gKeyUpChild = 0; </script> <input id='i4' onkeydown="gKeyDownChild++" onkeypress="gKeyPressChild++" onkeyup="gKeyUpChild++; this.parentNode.removeChild(this);">