I would like to collect all possible ways with which JavaScript can be defined in the web page for execution.
So far I know the basic part:
- script tag
- external script
- element attributes that start with “on”
- inside some tag: WIDTH=”&{barWidth};%” ALIGN=”LEFT”
- CSS IE: style=”left:expression(document.body.clientWidth/2-oDiv.offsetWidth/2);”
- DHTML behavior in IE
- in links: href=”javascript:alert(‘Hi’)”
Thanks!
More fugly things:
CSS expressions in IE — allows defining CSS properties as JavaScript expressions, which are evaluated on every possible DOM-event (on every mouse move, scroll step and so on).
DHTML Behaviors in IE — can bind
.htc-files with JScript to HTML elements through CSS.XBL bindings, Mozilla’s invention, can be defined via CSS as well.