id 定义
<span class="glyphicon glyphicon-refresh" id="refreshWeb"></span>
$("#refreshWeb").click(function() {
console.log(111);
})
传值定义 (这里我请求成功的值进行动态赋值)
tableList.forEach((item, index) => {
result += `<tr id="rowClick">
<td valign="middle">${item.id}</td>
<td >${item.sampleCode}</td>
<td >${item.no}</td>
<td >${item.name}</td>
<td>
<button class="btn-link btn delete" id="${item.sampleCode}">受理</button>
</td>
</tr>`
//
$(document).on("click", '.delete', function(x, y) {
//可以获取到id的值
console.log(xx.target.id);
});
<a id="btn" class="waves-effect waves-light btn">提交</a>
$("#btn").on('click',function(){
})