-4

What would a javascript script be so my browser automatically redirects to the next page example being.

wwww.page.com/1

www.page.com/2

www.page.com/3

and so on so on, changing every 10 seconds.

I would want to code be something I can just input in to my browser, I don't actually want it on a webpage

Jonas
  • 121,568
  • 97
  • 310
  • 388
Tomaso88
  • 1
  • 1
  • https://en.wikipedia.org/wiki/Meta_refresh – Rick Jun 30 '16 at 15:29
  • Possible duplicate of [How do I redirect with Javascript?](http://stackoverflow.com/questions/4744751/how-do-i-redirect-with-javascript) –  Jun 30 '16 at 16:11

1 Answers1

0

We can user window.location with in setTimeout function. Here I am giving an example code.

in www.page.com/1 write

setTimeout(function(){ window.location = "http://www.page.com/2" }, 10000);

in www.page.com/2

setTimeout(function(){ window.location = "http://www.page.com/3" }, 10000);

and so on.
You can run the JavaScript code in browser console also, if you don't want to run in browser only.
SetTimeout() method calls a function or evaluates an expression after a specified number of milliseconds.

gre_gor
  • 6,669
  • 9
  • 47
  • 52
Andolasoft Inc
  • 1,296
  • 1
  • 7
  • 16