<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="status"></div>

    <input type="button" value="删除" onclick="sureDelete();">

    <script>
        function sureDelete(){
            var v = confirm('确认删除吗?');
            console.log(v);
            document.getElementById("status").innerText = '已删除';
            setTimeout(function () {
                document.getElementById('status').innerText=''

            }, 5000)

        }
    </script>

</body>
</html>

 

posted on 2018-07-11 20:14  python我的最爱  阅读(218)  评论(0编辑  收藏  举报