js动态给table添加/删除tr的方法. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>JS动态为table添加与删除tr-www.jbxue.com-脚本学堂 </TITLE> <META NAME="Generator" CONTENT="EditPlus"
table.on('tool(hostTable)', function (obj) { var data = obj.data;//须写 if (obj.event === 'del') { var parents = $(this).parents('.elementClass'); operateId = $(parents).attr('id'); layer.confirm('确认删除么', function (index) { 1.找到删除按钮所在的父元素,以确定是哪一个表格tabl
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <ti