I was wondering what elements can contain javascript code in their attributes? I know that it's allowed in link "href" (javascript://) and all on* attributes.
Do browsers execute javascript code from any other attributes?
It's allowed in href because that's what gets put into your browser address bar. Similarly you can use something like:
document.location.href = 'javascript:alert("hello");';
There isn't really a good reason to put JavaScript in href though. It's very limited in it's usefulness. I would suggest the proper route of onclick handlers or some setup that reacts to changes in the # (hash).
%Script;. The only attributes are theon*attributes.hrefon anchors/areas I've foundforms to executejavascript-pseudoprotocol-URIs in theiractionattribute for example. It doesn't work for all%URIattributes though, e.g. aimgsrc