Select all text on hover in input text box - Javascript jQuery

Javascript examples for jQuery:Form Input

Description

Select all text on hover in input text box

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-git.js"></script> 
      <script type="text/javascript">
    $(function(){//from  w w w . jav a2s.  co  m
$('#test').mouseenter(function() {
    this.focus();
    this.select();
});
    });

      </script> 
   </head> 
   <body> 
      <input type="text" id="test" value="Just some text here">  
   </body>
</html>

Related Tutorials