[Javascript] dom/javascript question regarding Internet Explorer
J. Lester Novros II
lester at denhaag.org
Fri Jul 20 10:28:56 CDT 2007
Lee Bettridge wrote:
> That's exactly what I needed, thanks :)
>
> Isn't it weird though, that you can access it through
> document.title;
>
> And not
> document.getElementsByTagName("TITLE");
If you insist in doing it that way I would opt for
document.getElementsByTagName("TITLE").item(0).firstChild.nodeValue instead
of messing about with the data property.
In the interests of completeness, I did a quick test with the code you posted
originally. Results are as follows.
Both xPloder 6 & 7 do not understand any of this. It seems the title element
has neither child nodes nor a nodeValue. [since 6 didn't work I haven't even
tried below v.6].
Another point of note is that the Fox can be satisfied with
document.getElementsByTagName("TITLE").[0] instead of item(0); both Safari
and Opera insist on the use of the item method.
l8R lES
--
Claiming that [DRM] can ever be made secure [...] is like believing you can
create a secure bank vault by drawing chalk lines on the pavement, piling
the money inside and asking customers to "respect these boundaries".
http://www.supermarionation.tv - Jeremy Allison
More information about the Javascript
mailing list