文本框改变事件(不用失去焦点)

<script>
var OldValue = "";
function txt_Change(NewValue)
{
    if (OldValue != NewValue)
    {
        alert(NewValue);
        OldValue = NewValue;
    }
}
</script>
<body">
<input  type="text"  onKeyUp="txt_Change(this.value)">
</body>

posted @ 2015-12-22 14:18  小小高  阅读(446)  评论(0)    收藏  举报