News

But they can also slow it down-- images are files, files use bandwidth, and bandwidth is directly related to wait times. ... Like many other objects in JavaScript, the Image() object ...
So, this code starts off by checking to see if the document.images object exists. Then add this line: ... we’re creating an image object on the fly by using JavaScript’s eval method.
Remember that because we named our image myButton, we created a new image object document.myButton. In order to change the image that’s displayed, we need to update the src property of this image.