<html>
<style>
INPUT.bgyellow {background-color: yellow}
</style>
<body>

<script>
changed = 0;
function change(field)
{
for (var node = 0; node < field.attributes.length; node++)
{
if (field.attributes[node].nodeName == 'class')
{
if (field.defaultValue == field.value)
{
if (field.attributes[node].nodeValue != 'bgwhite')
{
field.attributes[node].nodeValue = 'bgwhite';
changed--;
}
}
else
{
if (field.attributes[node].nodeValue != 'bgyellow')
{
field.attributes[node].nodeValue = 'bgyellow';
changed++;
}
}
field.form.reset.disabled = ! changed;
break;
}
}
}

function changeall(form)
{
form.reset.disabled = true;
changed = 0;
for (var el = 0; el < form.elements.length; el++)
{
if (form.elements[el].name != 'reset') /* Some way needed of knowing which to reset. */
{
for (var node = 0; node < form.elements[el].attributes.length; node++)
{
if (form.elements[el].attributes[node].nodeName == 'class')
{
form.elements[el].attributes[node].nodeValue = 'bgwhite';
break;
}
}

}
}
}
</script>
<form onReset=changeall(this)>

<input name=ta class=bgwhite size=14 value="Over key me" onKeyUp=change(this)>

<input name=ta class=bgwhite size=14 value="or me" onKeyUp=change(this)>

<input disabled type=reset name=reset></form>

</body>
</html>