JS 三个对话框

<!DOCTYPE html>


<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <script>
        //alert(123);


        //点确定返回true,点取消返回false
        //var result = confirm('确实要删除吗?');
        //alert(result);



        //点确定返回输入的值,点取消返回null
        var result = prompt('请输入年龄', '10');
        alert(result);

    </script>
</head>
<body>


</body>
</html>

猜你喜欢

转载自blog.csdn.net/dxm809/article/details/80248113