<html>
<INPUT type="text" name="t1" id="t1" onpropertyChange="document.getElementById('t2').value=this.value">
<INPUT type="text" name="t1" id="t2">
</html>

解决方案 »

  1.   


    <INPUT type="text" name="a" id="a" onkeyup="document.getElementById('b').value=this.value">
    <INPUT type="text" name="b" id="b">
      

  2.   

    學習~~
    總結下︰
    在IE下,当一个HTML元素的属性改变的时候,都能通过 onpropertychange来捕获。例如一个<input name="text1" id="text1" />对象的value属性被页面的脚本修改的时候,onchange无法捕获到,而onpropertychange却能够捕获。
    也就是说:onpropertychange能及时捕获属性值的变化,而onchange在属性值改变时还必须使得当前元素失去焦点(onblur)才可以激活该事件,响应比較慢。
    個人感覺用onpropertychange比較好。
      

  3.   

    帅帅的宝宝必定全部代码,最精简代码,放入记事本即可~
    <INPUT type="text" name="a" onkeyup="b.value=this.value"> 
    <INPUT type="text" name="b">  
      

  4.   

    <html>
    <INPUT type="text" name="t1" id="t1" onpropertyChange="document.getElementById('t2').value=this.value">
    <INPUT type="text" name="t1" id="t2">
    </html>
    用onpropertychange比较好
      

  5.   

    大家都知道  onpropertyChange
      

  6.   

    当一个HTML元素的属性改变的时候,都能通过onpropertychange来捕获。例如一个<input name="text1" id="text1" />对象的value属性被页面的脚本修改的时候,onchange无法捕获到,而onpropertychange却能够捕获。具体理解为:onpropertychange能及时捕获属性值的变化,而onchange在属性值改变时只有通过鼠标执行某些操作才能激活该事件!
      

  7.   

    <INPUT type="text" name="a" onkeyup="b.value=this.value"> 
    <INPUT type="text" name="b"> 
      

  8.   

    学到了,不错的回答 
    onkeyup 精简
    onpropertychange 更有效
      

  9.   

    firefox  不支持 onpropertychange    事件么?