在时间间隔后在JS中进入新窗口 [英] opeing a new window in JS after time interval

查看:70
本文介绍了在时间间隔后在JS中进入新窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在交通交换网站上工作,在两点上几乎不需要帮助.

当用户单击冲浪按钮时,它将从数据库获取URL并开始在弹出窗口中显示它们,现在的问题是我如何从数据库获取下一个URL,因为我无法全部获取,因为可能会有超过10K +,并且下一个URL应该在同一弹出窗口中打开,以及如何在倒数至0秒后在用户帐户中添加点.

Hi
i am working on traffic exchange website need little help on two points.

When user click on surf button then it will get urls from DB and start showing them in popup window now the problem i am having is that how i can get next url from DB as i cant get all as there can be more then 10K+ and also next url should open in same popup and how to add points into user account after countdown to 0seconds.

推荐答案

JS函数设置时间间隔:
JS function to set time interval:
function open_win() {
    window.open("x.com");
    setTimeout("window.open('y.com')",60000);
    setTimeout("window.open('z.com')",120000);
}


这将打开x.com,然后在y.com一分钟后打开,然后在两分钟后应打开z.com.


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


这篇关于在时间间隔后在JS中进入新窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆