<input class=inpu type="text" onKeyDown="javascript:return myFilter(event.keyCode, this);"id="lrby_1" size="30" maxlength="20" onChange="lrqm_1.value=12222">
<input type = text id = lrqm_1>"lrqm_1"是不是id呀

解决方案 »

  1.   

    不是,应该是name,
    id 能取值吗?!
      

  2.   

    onpropertyChange="lrqm_1.value=12222">
      

  3.   

    不对,刚才讲错了
    msdn上面是这么说的。我刚才试了也是。当文本框失去焦点的时候才触发onchange事件
    This event is fired when the contents are committed and not while the value is changing. For example, on a text box, this event is not fired while the user is typing, but rather when the user commits the change by leaving the text box that has focus. In addition, this event is executed before the code specified by onblur when the control is also losing the focus. 
    <input class=inpu type="text" onKeyDown="alert('heihei');" name="lrby_1" size="30" maxlength="20" onchange="lrqm_1.value=12222"><input class=inpu type="text" name="lrqm_1" size="30" maxlength="20" readonly>