开发者

php + javascript open a link in new weindow (tab) automatically

I have 100开发者_如何学运维 links for example, in a file. The idea is to loading to a php page, it loads the links file, it reads the first line and gets the first link. Then it opens it in a new window of browser, after 5 seconds the page refreshes itself and it gets the second link from the file and opens it in a new window again.

Now, I can do the whole thing by php, But I don't know how to open the link in a new window automatically without any click. and I guess it might be possible through JS.

Thanks for help :)


window.open('http://www.someurl.com','NameOfWindow');

There are also attributes you can keep specify to have more control. See http://www.pageresource.com/jscript/jwinopen.htm

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜