Hi ,
I am making a program in which text goes when user types similar to facebook status update textbox the grey text goes away when user types
i have used
[code ]<html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"> </script> <script> $("documnet").ready( function(){ $(document).keypress(function(event) { if (event.keyCode != 1 && event.keyCode != 2 && event.keyCode != 3) { $('input[type=text]').val(''); // alert('this is not mouse!'); } }); </script> </head> <body> <input type="text" id="txt" value="Surbhi"> </body> </html> [/code]
but the problem is user is only able to type one alphabet in this.
Any suggestions ???
Thanks