JavaScript Tutorial/Style/getPropertyValue — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:24, 26 мая 2010
Get style value by property value (IE does not support DOM style methods)
<source lang="javascript">
<html> <head> <title>Style Example</title> <script type="text/javascript">
function useMethods() { var oDiv = document.getElementById("myDiv"); alert(oDiv.style.getPropertyValue("background-color")); }
</script> </head> <body>
<input type="button" value="Use Methods" onclick="useMethods()" /> </body> </html></source>