We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
现在的刷新机制是整个HTML代码块替换。替换后本来绑定了点击事件的元素丢失,所以又进行了重新绑定。 一个避免重复绑定的方案是利用JavaScript事件冒泡: 为需要监听的元素的父级元素(不会因刷新被替换的那个节点)绑定点击事件,当其中的元素被点击时捕获目标元素,判断如果是刷新按钮,则执行刷新流程。其余不做处理。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
现在的刷新机制是整个HTML代码块替换。替换后本来绑定了点击事件的元素丢失,所以又进行了重新绑定。
一个避免重复绑定的方案是利用JavaScript事件冒泡:
为需要监听的元素的父级元素(不会因刷新被替换的那个节点)绑定点击事件,当其中的元素被点击时捕获目标元素,判断如果是刷新按钮,则执行刷新流程。其余不做处理。
The text was updated successfully, but these errors were encountered: