update
This commit is contained in:
parent
962caebbb7
commit
87bf53d076
1825 changed files with 94929 additions and 0 deletions
10
2-ui/2-events-and-interfaces/4-event-bubbling/bubble-target.view/script.js
Executable file
10
2-ui/2-events-and-interfaces/4-event-bubbling/bubble-target.view/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