[JavaScript]

Images and JavaScript

document.images[] is an array of the images in an HTML page; the first image is images[0] Each image has a read/write src attribute. Setting the src attribute can be used for animations. An assigned image should have the same height and width as the original.

It is important to stop animations and other JavaScript computations either after a fixed amount of time or when a document is unloaded otherwise they can continue to use CPU cycles. See the onLoad and onUnload attributes of the <BODY> tag and the Window.onload() and Window.onunload() event handlers.

Try [Reload] and also [Back] followed by [Forward].

See also: 513 colour table, Flowers and Towers of Hanoi.



© L.Allison Department of Computer Science, Monash University, Australia 3168 / 1997