|
Posted by Toby A Inkster on 12/19/05 12:00
Neredbojias wrote:
> Dont forget document.getElementById("...")... That's the one I just
> luuuv typing.
That's not a 1:1 equivalent to an HTML attribute though.
..className and .httpEquiv differ from the heuristic that I mentioned
earlier (all DOM properties that have a one-to-one mapping to HTML
attributes are lower case) out of necessity:
* "class" is a reserved word in JavaScript.
* "http-equiv" contains a hyphen which would be interpreted
as subtraction.
You are right about .bgColor though. How annoying. Come to think of
it, .aLink,.vLink and .accessKey. Most of these correspond to deprecated
attributes though.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 16 days, 21:12.]
Gnocchi all'Amatriciana al Forno
http://tobyinkster.co.uk/blog/2008/01/15/gnocchi-allamatriciana/
Navigation:
[Reply to this message]
|