js onclick redirect
<button onclick="location.href='www.yoursite.com'">Click Me</button><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>// Simulate a mouse click:
window.location.href = "http://www.w3schools.com";
// Simulate an HTTP redirect:
window.location.replace("http://www.w3schools.com");
Also in HTML:
- how can i make a quote element in html
- textarea resize off
- linking external pages html
- html italic
- how to set background image for web page in html local image
- javascript onclick alert are you sure
- html textarea locked
- html id
- tab space in html
- how to include a dash in html
- html js make dropdown list checkbox
- header html
- how to make a clock in html/javascript
- markdown to html
- cuales son los elementos bloque y los elementos linea
- search functionality for html table on text box
- how do i make a line in html
- turn off autocomplete input html
- doctype html model
- html date picker
- input types
- boostrap 4 clear input
- how to set up radios html
- html doctype declaration