Answers for "on click redirect"

7

js onclick redirect

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

onclick redirect to url

<td onclick="javascript:window.location.href-'http://www.stackoverflow.com'" style="cursor:hand">Stackoverflow</td>
Posted by: Guest on September-01-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
0

click on tr redirect new page

$(function () {
    $('table.table tr').click(function () {
        window.location.href = $(this).data('url');
    });
})
Posted by: Guest on June-02-2020

Browse Popular Code Answers by Language