You are here: Reference > JavaScript > client-side > style handling > properties > textDecorationBlink

textDecorationBlink property

Browser support:
Sets or returns a Boolean value that indicates whether the text blink feature is enabled for the element.
The text blinking is currently not supported by Internet Explorer and so the blink element and the textDecorationBlink property does not have any effect. To set the decoration of text, use the textDecoration style property.

Syntax:

object.textDecorationBlink;
You can find the related objects in the Supported by objects section below.
This property is read/write.

Possible values:

Boolean that indicates the state of text blink.
One of the following values:
false
Text blink is disabled.
true
Text blink is enabled.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the textDecorationBlink property:
<head>
    <script type="text/javascript">
        function ChangeDecor (propIdx){
            var div = document.getElementById ("myDiv");
            if (propIdx < 5 && div.style.textDecorationNone) {
                div.style.textDecorationNone = false;
                document.getElementsByTagName ("INPUT")[4].checked = false;
            }
            switch (propIdx){
            case 1:
                div.style.textDecorationBlink = !div.style.textDecorationBlink;
                break;
            case 2:
                div.style.textDecorationLineThrough = !div.style.textDecorationLineThrough;
                break;
            case 3:
                div.style.textDecorationOverline = !div.style.textDecorationOverline;
                break;
            case 4:
                div.style.textDecorationUnderline = !div.style.textDecorationUnderline;
                break;
            case 5:
                div.style.textDecorationNone = !div.style.textDecorationNone;
                if (div.style.textDecorationNone) {
                    for (i = 0; i < 4; i++) {
                        document.getElementsByTagName ("INPUT")[i].checked = false;
                    }
                }
                break;
            }
        }
    </script>
</head>
<body>
    <div id="myDiv">Change the decoration of this text with the checkBoxes below.</div>

    <input type="checkbox" onclick="ChangeDecor (1);"/>
     textDecorationBlink
    <br />

    <input type="checkbox" onclick="ChangeDecor (2);"/>
     textDecorationLineThrough
    <br />

    <input type="checkbox" onclick="ChangeDecor (3);"/>
     textDecorationOverline : 
    <br />

    <input type="checkbox" onclick="ChangeDecor (4);"/>
     textDecorationUnderline : 
    <br />

    <input type="checkbox" onclick="ChangeDecor (5);"/>
     textDecorationNone
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content