Alternatives to document.title?
I'm attempting to return the page title. Using document.title doesn't appear to be reliable. It's often returning the title of frames within a page and sometimes nothing depend开发者_开发百科ing on the web page. I'd like to return the title which appears at the top of the tab e.g Gmail - Inbox etc..
on a Gmail page. Is there any alternatives to document.title? I'm testing on Chrome.
Sounds like the problem is with frames. You could try top.document.title
, which will give you the title of the topmost frame.
精彩评论