# How to clear text contained in a input text box by user clicking inside?

**URL:** <https://forum.kirupa.com/t/how-to-clear-text-contained-in-a-input-text-box-by-user-clicking-inside/49746>\
**Category:** Uncategorized\
**Created:** [April 26, 2004, 1:49pm UTC](https://forum.kirupa.com/t/how-to-clear-text-contained-in-a-input-text-box-by-user-clicking-inside/49746 "2004-04-26T13:49:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sany](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@Sany](https://forum.kirupa.com/u/Sany)\
**Post date:** [April 26, 2004, 1:49pm UTC](https://forum.kirupa.com/t/how-to-clear-text-contained-in-a-input-text-box-by-user-clicking-inside/49746/1 "2004-04-26T13:49:01Z")

</div>

I’m trying to create a login area with an input text box for the username entry, this is fine and works well. However I would like to take it a stage further and have the word “username” which is inside the input text box clear as a user enters the text box with their cursor. can someone point me in the right direction to achieve this please?

Thanks
