Detailed explanation of how to use jquery to add, save, and delete table data

伊谢尔伦
Release: 2017-07-22 09:37:59
Original
2017 people have browsed it

We often do not process this data by submitting forms, because it is very cumbersome to traverse and process these large amounts of data in the background; a better approach is to save the data in json in the form of objects in the front-end page , and then directly convert json into the object we need in the background, so that we can directly process the object!

Add button

Copy after login

table id is pswd_basic_fill_template
Add method

function addRowForPswdBasicFillTemplate(tid){ var applyAreaOptionStr = $('#applyAreaOptionStr').val(); //这里是对select框的一些初始化 did = tid; var tr = $("").attr("bgcolor","#FFFFFF"); tr.append($("").html("")); tr.append($("").html("")); tr.append($("").html("")); tr.append($("").html("")); tr.append($("").html("")); tr.append($("").html("")); tr.append($("").html("