Javascript examples for jQuery:Form Input
selecting of text inputs
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.0.2.js"></script> <script type="text/javascript"> $(window).load(function(){/*from ww w .j a va2 s .co m*/ $('.code').focus(function() { this.select() }); $('.code').click(function() { this.focus(); this.select() }); }); </script> </head> <body> <input type="text" class="code" value="test text with spaces" width="700"> </body> </html>