Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何更新a的值<;td>;使用jquery_Php_Jquery - Fatal编程技术网

Php 如何更新a的值<;td>;使用jquery

Php 如何更新a的值<;td>;使用jquery,php,jquery,Php,Jquery,我正在创建一个显示用户帐户详细信息的表。在此表中,我正在管理用户的帐户。现在我想用accountStatus类在TD中显示accountStatus的更新值 foreach ($result_val->result() as $row) { $accountStatus = array('data' =>$row->accountStatus,'class' => 'accountStatus'); $this->table->

我正在创建一个显示用户帐户详细信息的表。在此表中,我正在管理用户的帐户。现在我想用accountStatus类在TD中显示accountStatus的更新值

foreach ($result_val->result() as $row) {
        $accountStatus = array('data' =>$row->accountStatus,'class' => 'accountStatus');
        $this->table->add_row($row->username,$row->email,$accountStatus,(($row->accountStatus == 'deleted')? " " :"<input  type=\"button\" id=".$row->userID." class=\"btn btn-warning btn-small block\" value=\"Block\"> <input type=\"button\" id=".$row->userID." class=\"btn btn-success btn-small activate\" value=\"Activate\"> <input type=\"button\" id=".$row->userID." class=\"btn btn-danger btn-small delete\" value=\"Delete\">"));
    }
但该值不会同时更新,而是在重新加载页面后显示。
请帮我解决这个问题。

这可能是指全局窗口对象。将
event.target
从单击处理程序传递到函数:

$(foo).click(function(event) {
    ...
    manage_user_account(id,val,event.target);
}


function manage_user_account(userID,value,button){
...
    $(button).closest('tr').find('.accountStatus').html(response.accountStatus);

这可能是指全局窗口对象。将
event.target
从单击处理程序传递到函数:

$(foo).click(function(event) {
    ...
    manage_user_account(id,val,event.target);
}


function manage_user_account(userID,value,button){
...
    $(button).closest('tr').find('.accountStatus').html(response.accountStatus);

您返回的是response.status吗?
不引用元素。它应该指什么?response.status是您返回的东西吗?
不指元素。这是什么意思?谢谢大家。因为你的帮助,我完成了这件事。它现在运行得很好。谢谢大家。因为你的帮助,我完成了这件事。它现在运行得很好。