document.classes.borderColor

JavaScript 1.2+ Nav4+ Syntax

document.classes.className.tagName.borderColor

Description

The borderColor property specifies the color of the border of an element as associated with the class called className. The definition can be further defined by specifying a tag or the word all for tagName.

Example

Listing 7.64 uses the borderColor property to set the color of the border that surrounds a text header to blue.

Listing 7.64 Setting the Border Color with the borderColor Property
 <html> <script> <!-- Hide //Create a style sheet class that creates a left border document.classes.ABORDER.all.borderWidths(10); document.classes.ABORDER.all.borderColor = "blue"; //Hide End ---> </script> <h2 class=Aborder=1>This ...

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.