reading CSS textdecoration

Giganews Newsgroups
Subject: reading CSS textdecoration
Posted by:  GoogleUsen… (Eddie)
Date: 13 Jul 2003

When I use JavaScript to read an element's textDecoration style, I
only get one value even if there are more than one in the sytle sheet.

For example if the text-decoration is defined as:
text-decoration : underline overline;

when reading element.currentStyle.textDecoration I only get

What's worse is that returns

I have spent most of today researching this issue on the Internet and
cannot find out how to determine if multiple decorations are set for
an element.

Complete example:

a.test :link {
  color : #00FF00;
  text-decoration : underline overline;
<SCRIPT language="JavaScript" type="text/JavaScript">
<!-- Begin
function bodyLoad() {
  var obj = document.getElementById('testLink');
//End -->
<BODY ONLOAD="bodyLoad()">
<A HREF="blank.htm" CLASS="test" ID="testLink">test</A>