confirm的运用

来源:互联网 发布:陆维开料软件 编辑:程序博客网 时间:2024/06/05 17:35
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript">
        var result = confirm("确定要删除吗");
        if (result == true) {
            alert("你点击的结果是确定");
        }
        else{
            alert("你点击的结果是取消");
        }
       
    </script>
</head>
<body style="overflow:auto;">
aaaaaa
</body>
</html>