html动态生成的代码,绑定事件

如果使用jQuery,你可以这样写:

1 // .class为你绑定事件的动态生成的结点
2 $(document).on('click', '.class', function() {
3     // 你要绑定的事件在这里
4 });
原文地址:https://www.cnblogs.com/y114113/p/6289403.html