Changing CSS with JavaScript is pretty well known. Is there a way to go the other way? Take the following code for example:
<body onload="runOnLoad()">
Can you set a listener in CSS to catch the onload event and then kick off the JavaScript script?
The following code does not work, of course. But maybe you can get an idea of what I am trying to do:
bodynload {javascript:runOnLoad()}
or
body {onload:javascript.runOnLoad()}
=================================================
<body onload="runOnLoad()">
Can you set a listener in CSS to catch the onload event and then kick off the JavaScript script?
The following code does not work, of course. But maybe you can get an idea of what I am trying to do:
bodynload {javascript:runOnLoad()}
or
body {onload:javascript.runOnLoad()}
=================================================