![]() |
how would i echo this javascript variable
i'm trying to echo this variable to the screen
Code:
thumbs = document.getElementById("thumbnailPane").getElementsByTagName("img");Code:
document.getElementById('output').innerHTML = 'field: ' + thumbs;Code:
field: [object HTMLImageElement]here is the whole peice of js code i'm using if ur interested. Code:
window.onload = initPage; |
That's the correct behaviour because
thumbs is an object. As JavaScript is very OOP. So you will need to access its methods. Such as like to get the actual SRC of the image, use the following:javascript Code:
|
| All times are GMT. The time now is 08:38 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0