How to open URL in same window and in same tab with HTML button and JavaScript

1 Answer

0 votes
<script>
   function openURL(url) {
          window.open(url, "_self");
   }
</script>
 <button type="button" onclick="openURL('register.php')">Register</button>

 



answered Jun 5, 2017 by avibootz
...