The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Add a Class with onFocus
How can a class be applied/changed on a form using onfocus?
Something like:
Thank you, Charlie
Why not this?
input:focus { }
Yes. Why not. Why make something complicated?
I’m not understanding your question
I believe he doesn’t know how to target the same input element and change its class on focus
It was a rhetorical question. I didn’t think about the simple solution of using :focus in css.