Javascript examples for jQuery:Form Input
HTML textbox input, select all text on click
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js"></script> <script type="text/javascript"> window.onload=function(){//from www. j a va2s. c o m $('input').on('click', function(e) { var that = $(this); setTimeout(function(){ that.select(); }, 100); }); } </script> </head> <body> <input type="text" readonly value="blah"> </body> </html>