Posted by Mateusz Markowski on 11/12/06 11:40
KE napisał(a):
> Hi
>
> I have this Javascript code snippet which I add to the "onload" event
> of the "<body>" tag:
>
> document.title = document.getElementById('column_title').innerHTML;
>
> The element id "columnt_title" is the id of a heading ("<h1>") on the
> page that happens to be the title of the main article on that page.
>
> I couldn't find this in the help or main reference documents on
> php.org. I'm sure it's pretty simple. Is it...
>
> $document->title =
> €document->get_element__by___id('column_title')->£(["_inner_HTML_"])->|<<-(...);
>
> ? :-D (impish grin) (I added the other currencies to make the code more
> robust. The extra underscores makes the call virtual :-])
>
It's rather DOM question.
echo $document->getElementById('column_title')->firstChild->nodeValue;
Navigation:
[Reply to this message]
|