1 reply [Last post]
camillenelson1
Offline
Regular
Last seen: 15 years 33 weeks ago
Joined: 2005-11-18
Posts: 22
Points: 0

I am wondering if anyone would know how to do this.

Refer to site:

www.brighton96.com

In the join Email list, I want it so when you click in the box, the words disappear. Any suggestions?

thank you

Camille Nelson

Tags:
Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 7 years 38 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Moved to Off Topic as this

Moved to Off Topic as this is a javascript question (Site Discussion is for topics related to this site.)

	<script type="text/javascript">
	function clearField(thefield) {
		if (thefield.defaultValue==thefield.value)
		thefield.value = ""
	} 
	</script>

<input type="text" name="" value="Your text" onfocus="clearField(this)" />

You could do something like this.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference