Javascript examples for jQuery:Form Input
input select event function
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script> $(function(){//from w w w . j a va 2s. c om $("input").on('select', function(e) { e.preventDefault(); $(this).after("Text selected "); }); $("button").click(function(){ $("input").select(); }); }); </script> </head> <body> <input type="text" name="FirstName" value="Hello World"> <br> <button>Trigger select event</button> </body> </html>