Javascript examples for jQuery:Form Text Input
remove input textbox default value
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.1.js"></script> <script type="text/javascript"> $(window).load(function(){//from w ww .j a va2s. c o m $(function() { $('#userName').click(function() { $(this).val('').unbind('click'); $(this).focus(); }); }); }); </script> </head> <body> <input type="text" value="user name" id="userName"> </body> </html>