As a javascript developer using onload often you will find that other script authors too love to use onload. Come sviluppatore con javascript onload spesso troverete che altri script di autori troppo amore per usare onload. Unfortunately onload accepts a function name and your reassigning will prevent others from using onload. Purtroppo onload accetta un nome di funzione e il tuo riassegnazione impedirà ad altri di usare onload. Here is a script which allows you to use onload even when others have used it and without breaking their script. Ecco uno script che consente di utilizzare onload anche quando gli altri lo hanno utilizzato e senza rompere i loro script.

The key idea is that you should be able to stack your function(s) above / below existing function call. L'idea chiave è che si dovrebbe essere in grado di impilare il tuo funzione (s) di cui sopra / sotto esistenti chiamata di funzione. Let’s look at the sample code below: Vediamo il codice di esempio qui di seguito:

I think I have well commented the code to make the script self-explanatory, but feel to ask questions. Credo di aver ben commentato il codice per rendere lo script spiega da sé, ma sento di fare domande. The code has been tested on Firefox, Internet Explorer and Opera. Il codice è stato testato su Firefox, Internet Explorer e Opera.