如何使用JavaScript重定向到另一个网页?

要使用JavaScript重定向到另一个网页,请使用window.location并提及您要重定向的网站链接。

<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>