Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

事件代理 #1

Open
BOMO-MAN opened this issue Jun 26, 2017 · 2 comments
Open

事件代理 #1

BOMO-MAN opened this issue Jun 26, 2017 · 2 comments

Comments

@BOMO-MAN
Copy link
Owner

事件代理的使用

实际上是事件冒泡的一个应用;应用场景,在一个父容器当中新增元素,而该元素又需要绑定事件时,可以吧事件绑定到父容器上,再用event.target代替this来处理当前元素即可。

@BOMO-MAN
Copy link
Owner Author

event.target

1 similar comment
@BOMO-MAN
Copy link
Owner Author

event.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant