|
Does this help?
Example code:
<html>
<body bgcolor="#306090" Text="#FFFFFF">
<form>
<input id="first" type="text" size="20"
onFocus="this.style.backgroundColor='#D0E0F0'"
onBlur="this.style.backgroundColor='#FFFFFF'">
<input id="second" type="text" size="15"
onFocus="this.style.backgroundColor='#D0E0F0'"
onBlur="this.style.backgroundColor='#FFFFFF'">
<input id="third" type="password" size="12"
onFocus="this.style.backgroundColor='#D0E0F0'"
onBlur="this.style.backgroundColor='#FFFFFF'">
</form>
</body>
</html>
Or Changing the color of a form element when it's blank - Source Code:
<script language="JavaScript" type="text/javascript">
<!--
function checkPink(obj) {
if (obj.value=='') {
if ((document.all)||(document.getElementById)) {
obj.style.backgroundColor = '#FF99CC';
}
} else {
if ((document.all)||(document.getElementById)) {
obj.style.backgroundColor = '#FFFFFF';
}
}
}
//-->
</script>
<form action="../">
<textarea rows="4" cols="40"
onclick="checkPink(this)"
onfocus="checkPink(this)"
onblur="checkPink(this)"
onchange="checkPink(this)">Delete this copy to make this pink</textarea>
<input size="30"
onclick="checkPink(this)"
onfocus="checkPink(this)"
onblur="checkPink(this)"
onchange="checkPink(this)"
value="Delete this copy to make this pink">
</form>
__________________
Disclamer: This is not a legal document. As with all information transfered via the internet, this message was subject to possible contamination and tampering I hold myself harmless as to its content as at appears at its intended destination.
|