Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to redirect a javascript page using javascript?


Asked by Thomas Patrick on Dec 06, 2021 JavaScript



It is quite simple to do a page redirect using JavaScript at client side. To redirect your site visitors to a new page, you just need to add a line in your head section as follows. Live Demo. <html> <head> <script type = "text/javascript"> <!-- function Redirect() { window.location = "https://www.tutorialspoint.com";
In addition,
JavaScript in . In this example, a JavaScript function is placed in the section of an HTML page. The function is invoked (called) when a button is clicked:
Next, To redirect from an HTML page, use the META Tag. With this, use the http-equiv attribute to provide an HTTP header for the value of the content attribute. The value in the content is the number of seconds; you want the page to redirect after. Set the content attribute to 0, if you want it to load immediately.
Thereof,
You are being redirected to: https://liw.logsa.army.mil If you are not redirected automatically in ten seconds or less, please press the submit button.
Furthermore,
You are being redirected to: https://liw.logsa.army.mil If you are not redirected automatically in ten seconds or less, please press the submit button.