how to refresh page on click of button
<button type="button" onClick="refreshPage()">Close</button>
<script>
function refreshPage(){
window.location.reload();
}
</script>
how to refresh page on click of button
<button type="button" onClick="refreshPage()">Close</button>
<script>
function refreshPage(){
window.location.reload();
}
</script>
how to make a button not reload on click
<button id="button">Button</button> <!-->Creates a new button.</!-->
<script>
const button = document.querySelector("#button"); //Finds the button by id.
button.addEventListener("click", e => { //Runs the function (doesn't have to be an arrow function, just a function.) whenever said button is clicked.
e.preventDefault(); //Stops said button from reloading the page.
}
</script>
autoclick button if refresh page html
window.onload=function(){
document.getElementById("linkid").click();
};
stop refreshing page on button click
<form method="POST">
<button name="data" onclick="return getData()">Click</button>
</form>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us