JS中keyup, keypress, keydown以及oninput四个事件的区别

$email_input.onkeyup=function(event){
//                console.log('event handle');//按方向键以及backspce esc有反应 长按字母键也没有反应
//            }
            
//            $email_input.oninput=function(){
//                console.log('event handle');//方向键无反应  backspce esc有反应 长按也有反应
//            }
//            
//            $email_input.onkeydown=function(){
//                console.log('event handle');//均有反应
//            }
//            
            $email_input.onkeypress=function(){
                console.log('event handle');//方向键无反应 ackspce esc有反应 esc有反应 长按也有反应
            }
原文地址:https://www.cnblogs.com/cmy1996/p/9208596.html