Images and JavaScript

LA home
Computing
ProgLangs
 JavaScript
  Images

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].

Also see the [Colour Table], [Flowers] and [Towers of Hanoi].

www #ad:

↑ © L. Allison, www.allisons.org/ll/   (or as otherwise indicated).
Created with "vi (Linux)",  charset=iso-8859-1,   fetched Thursday, 15-Apr-2021 09:04:45 EDT.

Free: Linux, Ubuntu operating-sys, OpenOffice office-suite, The GIMP ~photoshop, Firefox web-browser, FlashBlock flash on/off.