JavaScript Tutorial/Style/setProperty — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
(нет различий)

Версия 18:52, 25 мая 2010

Set style by property name

<html>
<head>
<title>Style Example</title>
</head>
<body>
<div id="div1"
     style="background-color: red; height: 50px; width: 50px"
     onmouseover="this.style.setProperty("background-color", "blue", "")"
     onmouseout="this.style.setProperty("background-color", "red", "")"></div>
</body>
</html>