increase the size of my textbox with input? - Javascript jQuery

Javascript examples for jQuery:Form Text Input

Description

increase the size of my textbox with input?

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.js"></script> 
      <script type="text/javascript">
function Expand(obj) {/* w  w w.j av  a  2  s  .c  om*/
    obj.size= parseInt(obj.value.length);
}

      </script> 
   </head> 
   <body> 
      <input id="Test" size="2" type="text" onkeyup="Expand(this)">  
   </body>
</html>

Related Tutorials