Reputation: 1547
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:
Thanks!
Upvotes: 2
Views: 143
Reputation: 26514
I think the only one left is in the href
attribute of anchors links like:
<a href="javascript:alert('hello, world!');">Say Hello</a>
This is how bookmarklets work.
This document describes all ways of embedding: http://docstore.mik.ua/orelly/webprog/jscript/ch12_02.htm
Upvotes: 1
Reputation: 17899
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.
Upvotes: 1