Answers for "button navigate to another page html"

7

js onclick redirect

<button onclick="location.href='www.yoursite.com'">Click Me</button>
Posted by: Guest on June-16-2020
0

button navigate to page

<button onclick="window.location.href = 'index.html'"> Navigate </button>
<!-- Replace 'index.html' with the name of the page to navigate to, or a URL. -->
Posted by: Guest on January-14-2021
4

how to open a new html page on button click in javascript

<button id="myButton" class="float-left submit-button" >Home</button>

<script type="text/javascript">
    document.getElementById("myButton").onclick = function () {
        location.href = "www.yoursite.com";
    };
</script>
Posted by: Guest on April-29-2020

Code answers related to "button navigate to another page html"

Browse Popular Code Answers by Language