javascript document 問題

temp = "logo"+temp
document.images.temp.src=path


點解用唔到, 但hard code 個temp , e.g.  document.images.logo5.src=path ,  咁就work wo, 請問有冇方法load 個variable 入document object, THX