Skip to content

Commit e62004a

Browse files
committed
op
1 parent a2fef88 commit e62004a

6 files changed

Lines changed: 92 additions & 132 deletions

File tree

2-ui/2-events/4-event-bubbling/article.md

Lines changed: 88 additions & 127 deletions
Large diffs are not rendered by default.

2-ui/2-events/4-event-bubbling/bubble-target.view/index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</head>
88

99
<body>
10-
Клик выведет <code>event.target</code> и <code>this</code>:
10+
A click shows both <code>event.target</code> and <code>this</code> to compare:
1111

1212
<form id="form">FORM
1313
<div>DIV
@@ -17,5 +17,4 @@
1717

1818
<script src="script.js"></script>
1919
</body>
20-
21-
</html>
20+
</html>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
var form = document.querySelector('form');
1+
let form = document.querySelector('form');
22

33
form.onclick = function(event) {
44
event.target.style.backgroundColor = 'yellow';
55

66
alert("target = " + event.target.tagName + ", this=" + this.tagName);
77

88
event.target.style.backgroundColor = '';
9-
};
9+
};
-71 Bytes
Loading
411 Bytes
Loading

figures.sketch

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)