init
This commit is contained in:
parent
06f61d8ce8
commit
f301cb744d
2271 changed files with 103162 additions and 0 deletions
10
02-ui/02-events-and-interfaces/04-event-bubbling/bubble-target/script.js
Executable file
10
02-ui/02-events-and-interfaces/04-event-bubbling/bubble-target/script.js
Executable file
|
@ -0,0 +1,10 @@
|
|||
|
||||
var form = document.querySelector('form');
|
||||
|
||||
form.onclick = function(event) {
|
||||
event.target.style.backgroundColor = 'yellow';
|
||||
|
||||
alert("target = " + event.target.tagName + ", this=" + this.tagName);
|
||||
|
||||
event.target.style.backgroundColor = '';
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue