Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to reload page on button click in javascript

<button type="button" onClick="refreshPage()">Close</button>

<script>
function refreshPage(){
    window.location.reload();
} 
</script>
Comment

how to make button reload the page use javascript

<button onclick="window.location.reload();">Reload Page</button>
Comment

how to reload the window by click on button in javascript

<button type="button" onClick="refreshPage()">Close</button>

<script>
function refreshPage(){
    window.location.reload();
} 
</script>
Comment

javascript button onclick reload page

const reloadtButton = document.querySelector("#reload");
// Reload everything:
function reload() {
    reload = location.reload();
}
// Event listeners for reload
reloadButton.addEventListener("click", reload, false);
Comment

PREVIOUS NEXT
Code Example
Javascript :: regex remove html tags 
Javascript :: how to console.log formData 
Javascript :: javascript change url without redirect 
Javascript :: react native rotate 
Javascript :: select body with javascript 
Javascript :: js loop array backwards 
Javascript :: js scroll to id 
Javascript :: shadow elevation react native 
Javascript :: jQuery and changing the input field type 
Javascript :: sleep for 1 second 
Javascript :: event exit fullscreen 
Javascript :: how to change a css variable with javascript 
Javascript :: react-native italics 
Javascript :: set attribute checked jquery 
Javascript :: regex for number and letters 
Javascript :: jquery submit form ajax 
Javascript :: split text by new line javascript 
Javascript :: installing jQuery in react js 
Javascript :: joi phone number validation 
Javascript :: how to displayan inteiger to a tenth in javascript 
Javascript :: npx react 
Javascript :: trigger change 
Javascript :: react.js installation 
Javascript :: remove extra space in string js 
Javascript :: check if date time string is invalid date js 
Javascript :: alphabets regex js javascript 
Javascript :: how to reload the same page using javascript 
Javascript :: check comma in string javascript 
Javascript :: select onchange jquery get the selected option data attribute 
Javascript :: get browser language 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =