Браузер |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||||||||||||
Версия |
6.0 |
7.0 |
8.0 |
9.0 |
2.0 |
3.0 |
4.0 |
5.0 |
9.2 |
9.6 |
10 |
2.0 |
3.1 |
4.0 |
5.0 |
2.0 |
3.0 |
3.6 |
4.0 |
|
Поддержка |
ondblclick=
"скрипт"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Параметр ondblclick</title>
<style type="text/css">
div {
height: 200px; /* Высота слоя */
background: #f0f0f0; /* */
padding: 5px; /* Поля вокруг текста */
border: 1px solid #333; /* Параметры рамки */
}
</style>
<script type="text/javascript">
var color = 0;
function colorDiv() {
if (color) {
document.getElementById("layer").style.background = "#f0f0f0";
color = 0;
}
else {
document.getElementById("layer").style.background = "#fc0";
color = 1;
}
}
</script>
</head>
<body>
<p>Дважды щелкните в этом поле для изменения цвета фона.</p>
<div id="layer" ondblclick="colorDiv()">
</div>
</body>
</html>