By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,462 Members | 799 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,462 IT Pros & Developers. It's quick & easy.

text-decoration

P: n/a
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

Jan 31 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Nevermind, found it:

Object.style.textDecoration='line-through';

Jan 31 '06 #2

P: n/a

ch****@totalise.co.uk wrote:
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

Jan 31 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.