动态创建的div怎么绑定点击事件

动态创建的div怎么绑定点击事件

回复
  • 盈震轩用户
    [[{"txt": "js\u4e2d\u7ed9\u52a8\u6001\u751f\u6210\u7684div\u5bf9\u8c61\u6dfb\u52a0\u7ed1\u5b9a\u70b9\u51fb\u4e8b\u4ef6\uff0c\u53eb\u505a\u4e8b\u4ef6\u59d4\u6258\uff0c\u4e0b\u9762\u662f\u4f7f\u7528jq\u7684\u5b9e\u73b0\u4e8b\u4ef6\u59d4\u6258\u7684\u8be6\u7ec6\u65b9\u6cd5\u6b65\u9aa4\u3002"}], [{"txt": ["\u5de5\u5177/\u539f\u6599"]}, {"txt": "html\u7f16\u8f91\u5668"}], [{"txt": ["\u65b9\u6cd5/\u6b65\u9aa4"]}, {"txt": "\u7b2c\u4e00\u6b65\uff0c\u6211\u4eec\u5148\u70b9\u51fb\u6253\u5f00html\u7f16\u8f91\u5668sublime_text\uff0c\u65b9\u4fbf\u6211\u4eec\u8fdb\u884c\u4ee3\u7801\u64cd\u4f5c\uff0c\u8be6\u7ec6\u5982\u4e0b\u56fe"}, {"img": ["https://exp-picture.cdn.bcebos.com/3c42a5ea3e863048ec7be260c33104ebf7a7528c.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}, {"txt": "\u7b2c\u4e8c\u6b65\uff0c\u7f16\u5199\u4e00\u4e2a\u52a8\u6001\u6dfb\u52a0div\u7684\u4f8b\u5b50\u4f8b\u5b50\u8be6\u7ec6\u662f\u5728\u4e00\u4e2a\u53ebapp\u7684div\u91cc\u6dfb\u52a09\u4e2a\u5185\u5bb9\u4e3a\uff08\u6211\u662f\u9009\u9879X\uff09x\u662f\u5e8f\u53f7\u7684\u4f8b\u5b50\uff0c\u8be6\u7ec6\u4ee3\u7801\u5982\u4e0b"}, {"img": ["https://exp-picture.cdn.bcebos.com/5e4e9c2b74ee1c32dd20649807f1d8a727334b8c.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}, {"txt": "\u7b2c\u4e09\u6b65\uff0c\u7ed9\u52a8\u6001\u751f\u6210\u7684div\u6dfb\u52a0\u7ed1\u5b9a\u4e8b\u4ef6\u65b9\u6cd5\u4e00\u201con\u201d\u65b9\u6cd5\uff0c\u8be6\u7ec6\u4ee3\u7801\u5982\u4e0b\u56fe\u52a8\u6001\u751f\u6210\u7684\u6bcf\u4e2a\u70b9\u51fb\u90fd\u80fd\u83b7\u53d6\u70b9\u51fb\u7684\u5e8f\u53f7\uff0c\u52a8\u6001\u7ed1\u5b9a\u4e86\u4e8b\u4ef6"}, {"img": ["https://exp-picture.cdn.bcebos.com/cca2552c56ee7b7f263649c16ef4fcf5ef0d418c.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1", "https://exp-picture.cdn.bcebos.com/3b8fb4d7726b0ce2ccdf01bbef781423bfb9b68c.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}, {"txt": "\u7b2c\u4e09\u6b65\uff0c\u7ed9\u52a8\u6001\u751f\u6210\u7684div\u6dfb\u52a0\u7ed1\u5b9a\u4e8b\u4ef6\u65b9\u6cd5\u4e8c\u201cdelegate\u201d\u65b9\u6cd5\uff0c\u8be6\u7ec6\u4ee3\u7801\u5982\u4e0b\u56fe"}, {"img": ["https://exp-picture.cdn.bcebos.com/e09173e89a618625f4abfb5c3b04541bd00faa8c.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}, {"txt": "\u7b2c\u4e94\u6b65\uff0c\u7ed9\u52a8\u6001\u751f\u6210\u7684div\u6dfb\u52a0\u7ed1\u5b9a\u4e8b\u4ef6\u65b9\u6cd5\u4e09\u201cbind\u201d\u65b9\u6cd5\uff0c\u8be6\u7ec6\u4ee3\u7801\u5982\u4e0b\u56fe"}, {"img": ["https://exp-picture.cdn.bcebos.com/0cdb2f0e1799e92a058077f4e1fec314f0c5a08c.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}], [{"txt": ["\u6ce8\u610f\u4e8b\u9879"]}, {"txt": "\u5e0c\u671b\u5bf9\u4f60\u6709\u5e2e\u52a9"}]]
    2024-11-22
    1楼
    回复

参与评论

游客评论不支持回复他人评论内容,如需回复他人评论内容请