keypress,无法拿到用户最新的输入值,在输入中文时还不触发。keyup,能拿到最新输入值了,但已经无法通过 preventDefault() 阻止输入。