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 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 :: jquery on click fade out element 
Javascript :: fetch and edit jsonplaceholder api 
Javascript :: express.static 
Javascript :: js navigate to anchor 
Javascript :: how to remove duplicate values in array of objects using javascript 
Javascript :: on function change body background image 
Javascript :: submit form in vue 
Javascript :: python iterate json file 
Javascript :: find is not a function javascript 
Javascript :: change key in array of objects javascript 
Javascript :: nodejs mysql insert query 
Javascript :: js string to regex 
Javascript :: gradlew command not found react native 
Javascript :: append HTML elements in JavaScript 
Javascript :: date js 
Javascript :: javascript sql 
Javascript :: convert nodes to array javascript 
Javascript :: how to map objects in react native 
Javascript :: how to hash with crypto Node.js 
Javascript :: javascript operator double pipes 
Javascript :: JavaScript Window - The Browser Object Model 
Javascript :: remove all symbols javascript 
Javascript :: react js console log not working 
Javascript :: javascript disable button 
Javascript :: javascript check if string contains character 
Javascript :: how to verify timestamp format in javascript 
Javascript :: javascript rupiah currency format 
Javascript :: javascript htmlentities 
Javascript :: moment js difference between two dates 
Javascript :: nodejs https server 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =