如何使用javascript获取当前窗口选项卡ID? [英] How to get current window tab id using javascript?
本文介绍了如何使用javascript获取当前窗口选项卡ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用javascript获取当前标签ID或名称?
How to get current tab id or name by using javascript ?
推荐答案
这将有效:
This will work:
var tabName = document.title;
这将为您提供选项卡的名称(选项卡上显示的文本)。
this will give you name of the tab (text displayed on the tab).
http://www.w3schools.com/jsref/prop_win_name.asp [ ^ ]
这篇关于如何使用javascript获取当前窗口选项卡ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文