francescomoi@usa.com wrote:[color=blue]
> Hi.
>
> I'm trying to insert some text between <head> and
> <body> but I'm not able.[/color]
Good, because it makes no sense what so ever to place text between the
HEAD element and the BODY element.
[color=blue]
> I try with:
> --------
> bodyPoint = document.getElementsByTagName('body');[/color]
A call to the getElementsByTagName method returns an object implementing
the NodeList interface.
[color=blue]
> var myLink = document.createElement("a");
> myLink.href = "http://www.yahoo.com";
> myLink.innerHTML = "Yahoo";
> bodyPoint.insertBefore(myLink, bodyPoint);
> ---------
>
> but it doesn't work. I get this error
> -----------
> bodyPoint.insertBefore is not a function[/color]
The NodeList interface does not implement an insertBefore method.
[color=blue]
> --------------
>
> What am I doing wrong? Thx.[/color]
Failing to RTFM, or failing to think about their content.
Richard.