Previous Message
Next Message

Can CSS Be Used In Conjunction With JS To Provide Form Validation?

Sent by CSS LIST EMAIL on 10 January 2004 01:01

Ben wrote:

Each of your fields has a name attached.  So:

document.forms[0].elements["someElement"] = "someValue";

should do the trick.

You may want instead to work with your form element *labels*, which is
somewhat more of a challenge.

Let's suppose that you've assigned a class to each of your labels, for

#myForm .labelClass {
  background-color: white;
  color: black;


Thanks Ben, I shall give this a shot.  Its sort of what I was looking into!


css-discuss [EMAIL-REMOVED]]
Supported by --
Previous Message
Next Message

Message thread:

Possibly related: