^^Javascript. Appunti, esperienze di programmazione.

Learning javascript

Because of the way the web works, it is always possible to look at the JavaScript programs that people put in their web-pages. This can be a good way to learn how some things are done. Because most web programmers are not 'professional' programmers, or consider JavaScript programming so uninteresting that they never properly learned it, a lot of the code you can find like this is of a very bad quality. When learning from ugly or incorrect code, the ugliness and confusion will propagate into your own code, so be careful who you learn from.

I valori delle variabili esistono solo per il tempo in cui la pagina e' aperta

var links_array = new Array()
var links_array_length
var ix_links_array = -1
function leggi_sq(nr){
links_array_length = parent.principale.document.links.length
for(i=parent.principale.document.links.length-1;i>=0;i--)
      {links_array[i]=parent.principale.document.links[i]}
}

Ordine di costruzione della pagina da parte del navigatore

E' indispensabile saperlo per capire la logica con cui inserire i pezzi js.

Vedi: