Answers for "how to click a button after a redirect"

4

how to redirect on button click in html

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

redirect on pressing button

<button onclick="location.href = 'www.yoursite.com';" id="myButton" class="float-left submit-button" >Home</button>
Posted by: Guest on August-03-2021

Code answers related to "how to click a button after a redirect"

Browse Popular Code Answers by Language