[Javascript] someJavascript (Events)

  1. Include Scripts
  2. #script src="myscript.js"##/script# >>> Before closing body tag

  3. Onload
  4. body onload="halo()"
  5. Similar to onload, you may use addEventListener("load",functionName) in script element
  6.               const myObject = document.getelementbyId()
                  myObject.addEventListener("load", functionName);
                  myObject.addEventListener("click", functionName);
                  myObject.addEventListener("keydown", functionName);
                  myObject.addEventListener("change", functionName);
                  myObject.addEventListener("submit", functionName);
    
                  myObject.addEventListener("mouseover", functionName);
                  myObject.addEventListener("mouseout", functionName);
                  myObject.addEventListener("focus", functionName);
                  
                

Source: ---


Disclaimer: The information in this webpage is shared by anonymous users from external online sources. We cannot guarantee its accuracy or truthfulness. Users should exercise caution and verify information independently.


© 2023 sunnypeaceisland.com