如何通过jQuery中的变量轻松确认 [英] How pass variable in jquery easy confirm
本文介绍了如何通过jQuery中的变量轻松确认的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通过使用javascript confim,我已经完成了挂起.现在我想把它变成jQuery,轻松确认我该怎么做
By using javascript confim i have done suspending. Now i want to turn this to jquery easy confirm how can i do this
该函数被循环调用
我的PHP代码:
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
}
jQuery轻松确认链接: http://projectshadowlight.org/jquery-easy-confirm-对话框/
Jquery easy confirm link: http://projectshadowlight.org/jquery-easy-confirm-dialog/
我尝试过这样,但是如果单击是",我想将"$ id"传递给它.这样我就可以暂停行.
I have tried like this but if click on 'yes' i want pass '$id' to it. So that i can suspend row.
请帮帮我
$("#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);
}
});
});
});
推荐答案
我尝试了有关jquery轻松确认的示例,该示例在本地系统中发现了bug.因此,我不再担心这个问题,并使用了jConfirm.
I have tried example about jquery easy confirm in local system found bug in it. So i have stopped worry about this question and used jConfirm.
这篇关于如何通过jQuery中的变量轻松确认的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文