我需要帮助来使用此现有代码(PHP&JQUERY&JALERT)。

function logout()
{
  if (confirm("Do you really want to logout?"))
    window.location.href = "logout.php";

}

如果我只是更改为JCONFIRM,这还不足以使其正常工作...

谢谢你的帮助

莉娜

有帮助吗?

解决方案

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”,无论响应如何,都必须清理变量。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top