Answers for "javascript on button click go to url"

4

javascript got to url

window.location.href = "https://www.google.com"
Posted by: Guest on December-03-2020
7

js onclick redirect

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

onclick go to url

<input type=button onClick="opener.location='https://www.plus2net.com/'" value='Make the Main window change'>
<input type=button onClick="opener.location='https://www.plus2net.com/html_tutorial/button-linking.php'" value='Bring the button linking tutorial again'>
<input type=button onClick="location='https://www.plus2net.com/'" value='Make the current  window change'>
<input type=button onClick="self.close();" value="Close this window">
Posted by: Guest on January-28-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 "javascript on button click go to url"

Code answers related to "Javascript"

Browse Popular Code Answers by Language