我需要帮助来使用这个现有的代码(php & Jquery & jAlert)的jConfirm。
function logout()
{
if (confirm("Do you really want to logout?"))
window.location.href = "logout.php";
}如果我只是更改confirm to jConfirm,这还不足以使它工作...
谢谢你的帮忙
莉娜
发布于 2009-11-10 00:00:55
function logout()
{
jConfirm('Do you really want to logout?', 'Logout', function(r) {
if (r)
window.location.href = "logout.php";
});
}评论的编辑:
function sid(id){
$_sidId = id;
jConfirm("Delete System ID for " + id + "?", 'Delete Sid', function(r) {
if (r){
window.location.href = "del_sid.php?id=" + $_sidId;
}
$_sidId = null;
});
}当我更好地看到脚本时,最好从"if“中删除变量"$_sidId”,无论响应如何,它都必须清除该变量。
https://stackoverflow.com/questions/1701772
复制相似问题