开发者

Using JavaScript console in Google Chrome how can I get the index of the selected/active/current Tab?

I am trying to retrieve the index of the currently active/selected/current tab. What is开发者_Python百科 the command to run which will retrieve the Index?


You would need to use Chrome API for this, which is available to extensions and apps.

chrome.tabs.getSelected(null, function(tab){
    console.log("index:", tab.index);
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜