Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/297.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 传递变量以单击函数jquery轻松确认_Php_Jquery - Fatal编程技术网

Php 传递变量以单击函数jquery轻松确认

Php 传递变量以单击函数jquery轻松确认,php,jquery,Php,Jquery,可能重复: 传递变量以单击函数jquery轻松确认 通过使用javascript confim,我完成了挂起。现在我想把它转换为jquery easy confirm,我该如何做呢 我的PHP代码(此函数在循环中调用): 我在本地系统中尝试了一个关于jquery easy confirm的示例,发现了其中的错误。所以我不再担心这个问题,而是使用了jConfirm function prepareRow( $flag, $Id ) { $rowResponse = '<tr>

可能重复:

传递变量以单击函数jquery轻松确认

通过使用javascript confim,我完成了挂起。现在我想把它转换为jquery easy confirm,我该如何做呢

我的PHP代码(此函数在循环中调用):


我在本地系统中尝试了一个关于jquery easy confirm的示例,发现了其中的错误。所以我不再担心这个问题,而是使用了jConfirm

function prepareRow( $flag, $Id )
{
$rowResponse = '<tr>    
                    <td style="width:12%"> ' . $Id . ' </td>
                    <td><a href="javascript:void(0);" id="suspend" ></a> </td>
                </tr>'; 
return  $rowResponse            
}
$("#suspend").easyconfirm({locale: {
    title: 'Are you sure?',
    text: 'Are you sure, you want to suspend?',
    button: ['No',' Yes'],
    closeText: 'Close'
}});
$("#suspend").click(function() {
    $.post("suspend.php", { "Id" : Id }, 
            function(data){
                $.ajax({
                    type:"POST",
                    url: "prepareTable.php",
                    success: function(data){
                    $("#example").html(data);
                }
                });
            });
});