»
EnglishFrenchVietnamese

Print - Multiple Functions onLoad - JavaScriptBank.com

Full version: jsB@nk » Snippet » Multiple Functions onLoad
URL: https://www.javascriptbank.com/multiple-functions-onload.html

Multiple Functions onLoad © JavaScriptBank.comLet use this JavaScript code if you want to load serval functions with onLoad event. Very short script and easy to use, but you can load unlimited functions.

Full version: jsB@nk » Snippet » Multiple Functions onLoad
URL: https://www.javascriptbank.com/multiple-functions-onload.html



JavaScript
<script type="text/javascript">// Created by: Simon Willison | http://simon.incutio.com/function addLoadEvent(func) {  var oldonload = window.onload;  if (typeof window.onload != 'function') {    window.onload = func;  } else {    window.onload = function() {      if (oldonload) {        oldonload();      }      func();    }  }}addLoadEvent(nameOfSomeFunctionToRunOnPageLoad);addLoadEvent(function() {  functionHere();});</script>