Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

run onclick function once

function myFunction() {
  let value = 1 // change to random value
  if(document.getElementById("myId").innerHTML = value) {
    // do something
    
 myFunction == function(){}; // emptying my function after it is run once 
}}
 
PREVIOUS NEXT
Tagged: #run #onclick #function
ADD COMMENT
Topic
Name
8+1 =