开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜