<SCRIPT>
function clearField(field)
{
// Check if field
contains the default value
if (field.value == field.defaultValue)
{
//
It does, so clear the field
field.value
= "";
}
}
function checkField(field)
{
// Check if user has
entered information in the field
if (field.value == "") {
//
User has not entered anything
field.value
= field.defaultValue;
}
}
</SCRIPT>
<FORM>
<INPUT
TYPE="text"
NAME="name"
VALUE="Name"
onFocus="clearField(this);"
onBlur="checkField(this);">
<INPUT
TYPE="text"
NAME="email"
VALUE="E-mail Address"
onFocus="clearField(this);"
onBlur="checkField(this);">
<INPUT
TYPE="text"
NAME="phone"
VALUE="Phone Number"
onFocus="clearField(this);"
onBlur="checkField(this);">
</FORM> |