Why doesn’t document.getElementById(’location’).value work as function parameter in Javascript?されないのはなぜdocument.getelementbyid ( '場所 ' ) 。 関数の引数として働くにはJavaScriptですか?

What does work is:何がうまくいくのは:

var temp = document.getElementById(’location’); var気温= document.getelementbyid ( ' 場所' ) ;
temp.value works fine as function parameter. 関数の引数としてtemp.value正常に動作します。

Apparently javascript doesn’t like referencing fields directly on functions as in getElementById(’location’).value as a function parameter. JavaScriptを明らかに好きではないフィールドを直接参照する機能のようにgetElementByIdと( '場所' ) 。値を関数のパラメータを指定します。 IMHO this is implementation defect. imho 、この欠陥は実装します。

I hit against it once in a while and then I forget all about it.私がたまにはアゲンストと入力し、私は完全に忘れることです。 This time I am documenting it for posterityこの時点で私はそれは、後世の文書 : )