HighDots Forums  

Textarea computed style ?

Javascript (Italian) Il linguaggio JavaScript (it.comp.lang.javascript)


Discuss Textarea computed style ? in the Javascript (Italian) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
HyP
 
Posts: n/a

Default Textarea computed style ? - 05-08-2008 , 05:07 AM






Ciao,
ho bisogno di salvare lo stile di bordi e sfondo di alcuni input e
textarea...
Per gli input utilizzo la seguente senza problemi:

function getStyle(obj,styleProp)

{

if (obj.currentStyle)

var y = obj.currentStyle[styleProp];

else if (window.getComputedStyle)

var y =
document.defaultView.getComputedStyle(obj,null).ge tPropertyValue(styleProp);

return y;

}

per es:

var s=getStyle(document.getElementById('idInput'),'bor derTopStyle');

Tutto questo non funziona (vengono ritornati valori non corretti) cercando
di leggere le proprietà (per es: borderTopColor,borderTopStyle e
borderTopWidth) di un oggetto <textarea>.



Suggerimenti, idee?



Ciauz,

HyP



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.