이 익명 함수는 마우스 이동으로 시작됩니다.두 이벤트가 동일한 함수를 실행합니다.
var timeout;
// onkeypress
document.onmousemove = function(){
clearTimeout(timeout);
timeout = setTimeout(function(){alert("move your mouse");}, 1000);
}
키를 눌러도 해고 당할 수 있습니까?
document.onmousemove.namedfunction();
document.onkeypress.namedfunction();