[JavaScript] 확인창Window.confirm()

Yuri Lee·2021년 5월 20일
0

Window.confirm()

Window.confirm() 메서드는 확인과 취소 두 버튼을 가지며 메시지를 지정할 수 있는 모달 대화 상자를 띄운다.

Example

<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Window.confirm()</title>
</head>
<body>
 
    <script>
        if (confirm("Are you sure you want to delete the member?") == true) {
            //Yes
        } else {
            //No
        }
    </script>
 
</body>
</html>

https://developer.mozilla.org/ko/docs/Web/API/Window/confirm
https://parkdex.tistory.com/15

profile
Step by step goes a long way ✨

0개의 댓글