open page automatically using javascript

前端 未结 6 1621
星月不相逢
星月不相逢 2020-12-19 04:38

Essentially, all I want to do is open an external web page after the current page is loaded via java script.

open my page -> javascript tells browser to o

6条回答
  •  执笔经年
    2020-12-19 05:12

    Technically you can:

    location.href = "http://example.net/";
    

    … but you should perform an HTTP redirect instead as that is more reliable, faster and better food for search engines.

提交回复
热议问题