Can I use CSS to specify event handlers ?

Giganews Newsgroups
Subject: Can I use CSS to specify event handlers ?
Posted by:  Richard A. DeVenezia (radeve…@ix.netcom.com)
Date: Mon, 1 Sep 2003

Can I use CSS to set onmouseover ?

In HTML I have a bunch of <A HREF="whatever"
onmouseover=eventhandler(this)">stuff</A>. I would prefer not to have the
onmouseover 'pollution'

Is it possible to specify the eventhandler using css ? i.e.

<A HREF="whatever" class="foo">stuff</A>.

A.foo { on-mouse-over: eventhandler(this) }

Replies