有人能帮我在我的功能提醒框里加一个“是”或“否”吗


Can anyone gelp me add a yes or no in my function alert box please

这里是我的函数:

function alert($msg)
{
    echo "<script>alert('$msg');history.back();</script>";
}

这就是我如何调用函数:

if (statement is true)
{
  Update the query!
}
}else{ alert("Please enter numeric in age");echo formupdateadd2 ();}

你会说"确认"警报框吗?这就像一个警报框,但有两个按钮是/否,并且有一种方法可以获得如下结果:

if (confirm("do you want it ?")) 
{
    // if they clicked yes
}
else
{
    // if they clicked no
}