问题描述
我正在尝试使用javascript计算在我的Google chrome浏览器中打开的选项卡的数量.有谁知道如何做到这一点?
I am trying to count the number of Tabs that are open in my google chrome browswer with javascript. Does anyone know how to do this?
我写了一些要重复10次然后停止的JavaScript.完成1次迭代后,我使用以下命令打开一个新窗口:
I wrote some javascript that I want repeated 10 times and then stop. Upon the completion of 1 iteration, I open a new window using:
window.open("http://www.test.com");
我想做10次,而不是停下来.也许有比我在想的更好的方法...
I want to do this 10 times than stop. Maybe there is a better way than what I am thinking...
推荐答案
所以我无法找到一种方法来做自己想做的事情,所以我采用了另一种方法.我说过,让我们看看google是否可以在chrome中选择限制打开的标签页的数量,我发现有人写了一个扩展程序来做到这一点.我不知道他是怎么做到的,但肯定可以.受控的多选项卡浏览
So I couldn't figure out a way doing what I wanted so I took a different approach. I said, lets see if google has the option in chrome to limit the number of tabs opened and I found someone wrote an extension to do exactly that. I don't know how he did but it definitely works.Controlled multi-tab browsing
这篇关于计算打开的窗户数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!