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 :: make multiple array in one array 
Javascript :: stop window.setinterval javascript 
Javascript :: how to make a div appear onclick 
Javascript :: js check if array of dictionaries contain 
Javascript :: how to remove duplicate object in array javascript 
Javascript :: how to get file type in javascript 
Javascript :: window load 
Javascript :: change image src using jquery 
Javascript :: npm install nodemon 
Javascript :: javascript regex reference 
Javascript :: tick.json code 
Javascript :: js remove first element from array 
Javascript :: .NET number values such as positive and negative infinity cannot be written as valid JSON. 
Javascript :: javascript filter array of objects by key 
Javascript :: vue 3 script setup dynamic component sample 
Javascript :: Lazy Loading Routes vue 
Javascript :: number to array js 
Javascript :: Mars Exploration problem in js 
Javascript :: create module with routing in angular 13 
Javascript :: normalize method javascript 
Javascript :: angular redirect to external url 
Javascript :: install stripe to react/nodejs - typescript 
Javascript :: javascript sum table row values 
Javascript :: reducer in react example 
Javascript :: descending order in objects in js 
Javascript :: begins_with node js AWS dynamodb sort key 
Javascript :: moment timezone set clock in another timezone 
Javascript :: delete axios token 
Javascript :: react navigation history clear 
Javascript :: delay in javascript without await 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =