Ich fand glücklicherweise diesen Code auf dem Netz Kontinuierlich für auf onload aus einem anderen Thema hinzufügen komplettAusgabe mit mehreren Fenstern onload
function myPluginLoadEvent(func) {
// assign any pre-defined functions on 'window.onload' to a variable
var oldOnLoad = window.onload;
// if there is not any function hooked to it
if (typeof window.onload != 'function') {
// you can hook your function with it
window.onload = func
} else { // someone already hooked a function
window.onload = function() {
// call the function hooked already
oldOnLoad();
// call your awesome function
func();
}
}
}
// pass the function you want to call at 'window.onload', in the function defined above
myPluginLoadEvent(func);
Dies ist jedoch nur erlaubt eine auf onload Aufruf hinzufügen. Wie schleife ich das für mehrere Aufrufe beim Laden wie für i, 1 ++? Vielen Dank im Voraus.
Sie wollen mehr als 1 Funktion auf Fenster laden? –
nicht nur ein und wieder nach dem Scrollen und laden Sie mehr Daten mit YoutubeAPIIframeReady! – jason