Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

onload javascript function call

window.onload = function() {
  yourFunction(param1, param2);
};
//DOMContentLoaded It means when the DOM Objects of the document are fully loaded and seen by JavaScript, also this could have been "click", "focus"...
//function() Anonymous function, will be invoked when the event occurs.
// not work with IE8
document.addEventListener("DOMContentLoaded", function() {
  you_function(...);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #onload #javascript #function #call
ADD COMMENT
Topic
Name
6+1 =