Se ho:Come ottengo l'opacità di un elemento usando Javascript?
#em {
opacity:0.5;
}
Come faccio ad avere #em
s' opacità utilizzando javascript
? : D
ho problemi con il seguente (si restituisce nulla):
return document.getElementById("em").style.opacity;
Per IE avete bisogno di una soluzione in quanto non ha getComputedStyle, esempio: http://www.javascriptkit.com/dhtmltutors/dhtmlcascade4.shtml – TheZ
grazie, non sapevo di – John