i have an retrieved array items in the var test,如何在<img src="">和<a href=""> tags
for example :
var test = img;
Where test[0] holds the value that is grabbed from database as /images/gallery/1.jpp
Now i need to place the var test[0] to be place within img src=""
and a href=""
, so how can i achieve this?
中放置一個數組[i]項目?img'既是數組也是元素?您對數據的描述對我來說還不清楚。如果'img src =「」'指的是不同的'img'標識符,那麼它是否是DOM中的一個元素?或者一個字符串? – 2014-12-06 17:19:06