[Javascript] Setting title of web page

Adam Fahy mailme at myobligatory.com
Sun May 11 17:50:01 CDT 2008


Skip Evans wrote:
> So anyway, I can get the title by tag name:
> 
> var title=document.getElementsByTagName('title');
> 
> But I can't find the right arguments to pass to
> 
> setAttribute('?????','New Page Title');

Try:

document.getElementsByTagName('title')[0].text = "New Title"




More information about the Javascript mailing list