写一函数,在onKeyUp事件里调用

解决方案 »

  1.   

    <form method="POST" Name="Fom1" action=""><input name=text1 type=text size=30 value="" onKeyUp="document.Fom1.text2.value=document.Fom1.text1.value">
    <input name=text2 type=text size=30 value="">
    </form>
      

  2.   

    <html>
    <head>
    <script language=javascript>
    function bring(){
          document.form1.txtComments1.value=document.form1.txtComments.value;
    }
    </script>
    </head>
    <body>
    <form name=form1>
    <input  name=txtComments  type=text onkeyup="bring()">
    </TEXTAREA>
    <input  type=text  name=txtComments1>
    </TEXTAREA>
    </body>
    </html>
      

  3.   

    <html>
    <head>
    <script language=javascript>
    function bring(){
          document.form1.txtComments1.value=document.form1.txtComments.value;
    }
    </script>
    </head>
    <body>
    <form name=form1>
    <input  name=txtComments  type=text onkeyup="bring()">
    <input  type=text  name=txtComments1>
    </form>
    </body>
    </html>