Layer.background

JavaScript 1.2+ Nav4+ Syntax

							layer.background

Description

The background property of the Layer object refers to the BACKGROUND attribute of the <layer> tag. The background images for the layer object can be changed by setting the background.src property.

Example

Listing 7.320 shows an example of how to change the layer background image. Two layers are created and when the Change Background button is clicked, the change() function is called. The change() function sets the background property of layer1 to water.gif.

Listing 7.320 Example of the background Property
 <html> <head> <title> Using the background property of the Layer object</title> </head> <body> <script language="JavaScript"> <!-- Hide function change(){ ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.