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.current Style.textDecor ation I only get
"underline" !!
What's worse is that element.style.t extDecorationUn derline returns
"false"!!!
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:
<HTML><HEAD><TI TLE>Test</TITLE>
<STYLE>
a.test :link {
color : #00FF00;
text-decoration : underline overline;
}
</STYLE>
<SCRIPT language="JavaS cript" type="text/JavaScript">
<!-- Begin
function bodyLoad() {
var obj = document.getEle mentById('testL ink');
alert(obj.curre ntStyle.textDec oration);
alert(obj.style .textDecoration Underline);
}
//End -->
</SCRIPT>
</HEAD>
<BODY ONLOAD="bodyLoa d()">
<A HREF="blank.htm " CLASS="test" ID="testLink">t est</A>
</BODY></HTML>
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.current Style.textDecor ation I only get
"underline" !!
What's worse is that element.style.t extDecorationUn derline returns
"false"!!!
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:
<HTML><HEAD><TI TLE>Test</TITLE>
<STYLE>
a.test :link {
color : #00FF00;
text-decoration : underline overline;
}
</STYLE>
<SCRIPT language="JavaS cript" type="text/JavaScript">
<!-- Begin
function bodyLoad() {
var obj = document.getEle mentById('testL ink');
alert(obj.curre ntStyle.textDec oration);
alert(obj.style .textDecoration Underline);
}
//End -->
</SCRIPT>
</HEAD>
<BODY ONLOAD="bodyLoa d()">
<A HREF="blank.htm " CLASS="test" ID="testLink">t est</A>
</BODY></HTML>
Comment