How to reload a value in only one row of table

后端 未结 2 407
孤街浪徒
孤街浪徒 2021-01-22 02:56

i am have a table and there are some data in tables, and i have a refresh button in the last column of every row.

what i want is when i click some refresh button in some

2条回答
  •  被撕碎了的回忆
    2021-01-22 03:38

    $(".b1") and $(".b2") are selecting every element with that class. You need to filter based on the row the button is in using something like this:

    $("button").click(function(){
        var $row = $(this).closest("tr");
        $row.find(".b1").load("content.txt");
        $row.find(".b2").load("content1.txt");
    });
    

提交回复
热议问题