1.onblur表示失去焦点的时候被调用: 2.onkeyup表示键盘每输入完一个字符之后发生.简单来讲,就是键盘上的按键被放开的时候触发. 例子: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>输入金额DIY-bgy2014-11-22</title> <script type…
<script> /*onkeyup和onchange事件在IE下冲突,在此做区分*/ if (!!window.ActiveXObject || "ActiveXObject" in window){ console.log("The browser is IE!"); }else { console.log("The browser is not IE!"); //此部分是为了限制中文输入,style="ime-mode…