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);
}
});
});
});