标签:+= use 动态 cti style fun cli 动态添加 func
从1.7版本开始 添加了一个 on()方法
<table>
<tbody></tbody>
</table> <script> $(function(){ $("tbody").on("click", ".UserDel", function () { alert(‘1‘); }); });
<!--后台传进来的参数e-->
function show(e) { html = ""; for (var i = 0; i < e.length; i++) { html += "<tr>"; html += "<td class=‘UserID‘>" + e[i].ID + "</td>"; html += "<td>" + e[i].A1 + "</td>"; html += "<td>" + e[i].A2 + "</td>"; html += "<td>" + e[i].A3 + "</td>"; html += "<td>" + e[i].A4 + "</td>"; html += "<td>" + e[i].stateMsg + "</td>"; html += "<td><a class=‘UserDel‘ >删除</a></td>"; html += "</tr>"; } $("tbody").html(html); } </script>
标签:+= use 动态 cti style fun cli 动态添加 func
原文地址:https://www.cnblogs.com/lbx6935/p/10264106.html