Why doesn’t document.getElementById(’location’).value work as function parameter in Javascript? Perché non document.getElementById ( 'posizione'). Valore lavoro come parametro in funzione Javascript?

What does work is: Che cosa significa lavoro è:

var temp = document.getElementById(’location’); var temp = document.getElementById ( 'posizione');
temp.value works fine as function parameter. temp.value funziona bene come parametro di funzione.

Apparently javascript doesn’t like referencing fields directly on functions as in getElementById(’location’).value as a function parameter. Javascript apparentemente non come riferimento a settori direttamente a funzioni di getElementById ( 'Location'). Valore di un parametro di funzione. IMHO this is implementation defect. IMHO questo difetto è l'attuazione.

I hit against it once in a while and then I forget all about it. Mi ha colpito una volta contro di essa in un istante, quindi ho dimenticato tutto. This time I am documenting it for posterity Questa volta mi è documentare per i posteri :)