swal({
title: "생산 & 재가공을 진행 합니다",
text: "생산 단계를 선택를 해주세요",
type: "info",
showCancelButton: true,
showCloseButton: true,
confirmButtonClass: "btn-danger",
confirmButtonText: "ok!!",
cancelButtonClass: "btn-pink",
cancelButtonColor: "#ef0000",
cancelButtonText: "cancle!!",
closeOnConfirm: false
}).then((result) => {
if (result.value) { // TRUE
Swal.fire(
'title',
'text',
'success'
);
} else if (result.dismiss === Swal.DismissReason.cancel) { // FALSE
swal({
title: "",
text: "",
html: select,
showCancelButton: true,
closeOnConfirm: false,
inputPlaceholder: "Write something"
}, function (inputValue) {
if (inputValue === false) return false;
if (inputValue === "") {
swal.showInputError("You need to write something!");
return false
}
swal("Nice!", "You wrote: " + inputValue, "success");
});
}
});
};
});
SWEET ALERT2 간략사용법 예제 입니다.
'개발 > Script' 카테고리의 다른 글
글자 제한 id 생성시 나 입력폼에 영문,숫자,한글 제한시 (0) | 2019.12.12 |
---|---|
[jquery] jquery obj(오브젝트) 확인(출력)하는 방법 (1) | 2019.03.18 |
[jquery] 공백제거/ 공백없애기 (0) | 2018.05.08 |
[jquery]|제이쿼리 :: selectbox 동적 추가 하기 (0) | 2018.03.28 |
jQuery를 활용한 menu 자동 active 하기 (0) | 2017.09.22 |