Remove table row after clicking table row delete button

后端 未结 4 742
刺人心
刺人心 2020-12-01 08:00

Solution can use jQuery or be plain JavaScript.

I want to remove a table row after user has clicked the corresponding button contained in the table row cell so for e

4条回答
  •  长情又很酷
    2020-12-01 08:44

    Following solution is working fine.

    HTML:

    JQuery:

    function SomeDeleteRowFunction(btndel) {
        if (typeof(btndel) == "object") {
            $(btndel).closest("tr").remove();
        } else {
            return false;
        }
    }
    

    I have done bins on http://codebins.com/bin/4ldqpa9

提交回复
热议问题