opening new windows after specifc interval of time using window.open()

前端 未结 2 1687
余生分开走
余生分开走 2021-01-17 05:17

I am looking for javascript code which will open new tabs(windows) automatically after specific interval of time.

i have few websites over here, in this code which o

2条回答
  •  抹茶落季
    2021-01-17 05:37

    function open_win() {
        window.open("x.com");
        setTimeout("window.open('y.com')",60000);
        setTimeout("window.open('z.com')",120000);
    }
    

    This should open x.com then after one minute y.com and after two it should open z.com.

提交回复
热议问题