Essentially, all I want to do is open an external webpage after loading the current page through a java script.
open my page -> javascript tells browser to open external page -> external page being loaded into the broser
How can i do this?
you can use this
<html> <head> <script type="text/javascript"> function load() { window.location.href = "http://externalpage.com"; } </script> </head> <body onload="load()"> <h1>Hello World!</h1> </body> </html>
Technically, you can:
location.href = "http://example.net/";
... but instead, you should redirect the HTTP redirect as it is more reliable, faster, and better food for search engines.
, window.location. .
<body> <script> document.body.innerHTML += '<a href="https://www.google.com/" style="display: none;" id="link">Link</a>'; document.getElementById("link").click(); </script> <body>
"", URL- .
window.open("anyfile.*");
window.open("http://anylocation.com");
Hi, please try this code for page load time, we will redirect everything that configured the urls.
<!DOCTYPE html> <html> <head> <script> function myFunction() { window.open('https://google.com'); } </script> </head> <body onload="myFunction()"> </body> </html>