# Form setfocus() help!

**URL:** <https://forum.kirupa.com/t/form-setfocus-help/197074>\
**Category:** Uncategorized\
**Created:** [August 13, 2006, 4:23pm UTC](https://forum.kirupa.com/t/form-setfocus-help/197074 "2006-08-13T16:23:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flash\_Man1](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Flash\_Man1](https://forum.kirupa.com/u/Flash_Man1)\
**Post date:** [August 13, 2006, 4:23pm UTC](https://forum.kirupa.com/t/form-setfocus-help/197074/1 "2006-08-13T16:23:13Z")

</div>

Hey all,

just wondering what code you would use to have say:

name = “Name:”

shows in the input text field Name:

but when its clicked in it disappears and the user can type

BUT if there is content in there it stays with the content typed by user

Basically i just need the code for when you click in then i know it would be a few else and if statements but thats all good.

i think its set focus();

but if anyone can help it would be greatly appreciated thanks in advance!
