Open multiple web pages associated js script method to open the page

When their daily work will need to open many pages to use, if repeated every day open a Web page, or pages will be too much trouble. That there is no other solution? Of course, with the following js way to solve this problem.

<script>
var urls = new Array();
var timeout=2000;
function openTimer(nextIndex){	
    urls[0]="https://www.baidu.com/";
	urls[1]="https://www.jt111.com/";
	urls[2]="http://www.east-atom.com/";
	urls[3]="https://www.hc360.com/";
if(nextIndex>=urls.length)nextIndex=0;
window.open(urls[nextIndex],'_blank');
setTimeout(function(){openTimer(++nextIndex)},timeout);
}
openTimer(0);
</script>

This code is the code to open several websites, write it in Notepad and then into .html suffix on it.

So if we want to open that page comic, but there are a lot of pages related page how to do it? Do not worry, there are ways. The above code conversion is this:

<script>
var j=1;
function openTimer(nextIndex){	
var urls = new Array();
for(i=1;i<10;i++){
	urls[i]="https://ac.qq.com/ComicView/index/id/531490/cid/"+i+"?fromPrev=1";
	}
var timeout=2000;//间隔时间(毫秒,1秒=1000毫秒)可以自行设置
if(nextIndex>=urls.length)nextIndex=100000;
var winObj = window.open(urls[j],'_blank');
setTimeout(function(){openTimer(++j)},timeout);
}
openTimer(0);
</script>

Code is then placed in Notepad, and then changed to the suffix .html it. Is not it simple.

Guess you like

Origin blog.csdn.net/weixin_44003632/article/details/90901612