如果满足条件,我想打开一个 jquery 对话窗口。目前我只使用基本的确认和警报条件,但会改为对话。我熟悉对话框,但不熟悉如何从函数调用。我将如何修改我的代码来做到这一点?非常感谢
function confirm_entry(cref,id,rack,intakedate)
{
input_box=confirm("Please be aware that this is a permanent destruction and cannot be undone. Only proceed if you are sure you wish to destroy this box. If not, click the cancel button.");
if (input_box==true)
{
// Output when OK is clicked
window.location.href = "boxdestroy.php?custref="+cref+"&id="+id+"&rack="+rack;
}
else
{
// Output when Cancel is clicked
alert ("Thank you. Your destruction has been cancelled and no further action will be taken.");
}
}