Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / January 2006



Tip: Looking for answers? Try searching our database.

text-decoration

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chandy@totalise.co.uk - 31 Jan 2006 13:16 GMT
Hi,

I am trying to access the text-decoration property for an element's
style.

I know that this works:

Object.style.color = 'blue';

but this doesn't:

Object.style.text-decoration='line-through';

The 2nd appears to choke on the hyphen in text-decoration?

Is this the problem? How else can I access text-decoration for the
style?

Chandy
chandy@totalise.co.uk - 31 Jan 2006 13:26 GMT
Nevermind, found it:

Object.style.textDecoration='line-through';
impaler - 31 Jan 2006 16:16 GMT
> Nevermind, found it:
>
> Object.style.textDecoration='line-through';

Just a short notice:
when the property consists of 2 or more words and are separated by "-"
you obtain the respective property by taking out the "-" and capitalize
the next word.

ex: border-width -> borderWidth
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.