[Javascript] Call for author for JS book revision

Terry Riegel riegel at clearimageonline.com
Sat Nov 8 12:29:27 CST 2008


Hello everyone,

I have the following test code.

<html>
  <head>
  <style> #oPara1 {color: #00ff00; font-weight:bold; new-style: help;}
  </style>
  </head>
  <body>
  <P ID="oPara" STYLE="color: #00ff00; font-weight:bold; new-style:  
help;">This is the test paragraph.</P>
  <BUTTON onclick="alert(oPara.style.cssText)">Get CSS attributes</ 
BUTTON>
  <P ID="oPara1">This is the test paragraph1.</P>
  <BUTTON onclick="alert(oPara1.style.cssText)">Get CSS attributes1</ 
BUTTON>
  </body>
</html>

I am doing this in IE only. My end goal is to build a rounded corner  
plug in for IE, all the other browsers support this natively so  
getting my "fix" to work with other browsers is not necessary.

If I click on the button using the inline style="" tag the cssText  
property returns my styles, but if I move the styling to the head  
section then the cssText is empty.

Any ideas on how I can determine the css properties for the second  
paragraph?

Test page can be found at...
http://clearimageonline.com/playground/roundedcorners/cssText.html



Thanks,

Terry Riegel



More information about the Javascript mailing list