Answers for "jquery go to location"

0

go to page jquery

<!DOCTYPE html>
<html>

<head>
  <script>
    function goToURL() {
      location.href = 'http://google.it';

    }
  </script>
</head>

<body>
  <a href="javascript:void(0)" onclick="goToURL(); return false;">Go To URL</a>
</body>

</html>
Posted by: Guest on May-22-2020
0

navigate to url jquery

//As an HTTP redirect (back button will not work )
window.location.replace("http://www.google.com");

//like if you click on a link (it will be saved in the session history, 
//so the back button will work as expected)
window.location.href = "http://www.google.com";
Posted by: Guest on April-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language