Jquery Ajax remove rows from table and in db

后端 未结 4 1175
暖寄归人
暖寄归人 2020-12-10 21:45

I have a html table which if filled by values of an mysql table. This way:

function getCategories(){
    $prod = new C_Product();
    $cat= $prod->getCate         


        
4条回答
  •  暖寄归人
    2020-12-10 22:18

    Normally I would use a link instead of purely an image for that purpose. Since it is semantically correct:

    and then

    $(".deleteButton").click(function() { var deleteId = $(this).attr("href").substring(10); // Ajax or URl call etc. });

    One step further, I will even not put any image within the a, just put something like:

    Delete this row
    

    and leave any styling rule to CSS to handle (like image replacement).

提交回复
热议问题