How to redirect to another webpage using JavaScript?

JavascriptWeb DevelopmentFront End Technology

To redirect to another webpage in JavaScript, use window.location and mention the website link, where you want to redirect.

<html>
   <body>
      <p>Redirecting to another website</p>
      <script>
         window.location = "https://www.qries.com";
      </script>
      <p>This page will redirect to Qries.com</p>
   </body>
</html>
raja
Published on 02-Jan-2018 12:52:12
Advertisements