Javascript examples for jQuery:Form Text Input
Remove text from fields on input
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.4.2.js"></script> <script type="text/javascript"> $(window).load(function(){/* www . ja v a 2s . c o m*/ $('#myTextbox').focus(function() { $(this).val(""); }); }); </script> </head> <body> <input id="myTextbox" type="text" name="myTextbox" value="FooBar"> </body> </html>