use window dot location in java script

Click the following button, you will be redirected to home page.

<html>
   <head>
     
      <script type="text/javascript">
         <!--
            function Redirect() {
               window.location="http://www.google.com";
            }
         //-->
      </script>
     
   </head>
 
   <body>
      <p>Click the following button, you will be redirected to home page.</p>
     
      <form>
         <input type="button" value="Redirect Me" onclick="Redirect();" />
      </form>
     
   </body>
</html>

Comments

Popular posts from this blog

Set the variables to different values and different operators and then try...

auto redirected page in java script