SweetAlert에 메시지 표시
6748 단어 JavaScriptSweetAlert
SweetAlert에 메시지 표시
기본 정보
일가
개요
자바스크립트의 표준 장비로 경보, 메시지를 보낼 수 있지만 시간을 들여 정보를 예쁘게 보여줘야 한다.
기본용법
그냥 문자를 보냈어요.
sweetAlertSample.js
function basicSample(){
swal("基本の使い方");
}
제목 및 텍스트 추가
sweetAlertSample.jsfunction basicSample2(){
swal("ここにタイトル!", "そして、ここにテキスト!");
}
아이콘 추가
sweetAlertSample.jsfunction basicSample3(){
swal("アイコンつき!", "ボタンも付いてる!", "success");
}
아이콘 구분
사용할 수 있는 아이콘은 4가지입니다.
success
sweetAlertSample.jsfunction iconSample1(){
swal({
title: "success",
text: "successのicon",
icon: "success",
button: "OK",
});
}
error
sweetAlertSample.jsfunction iconSample2(){
swal({
title: "error",
text: "errorのicon",
icon: "error",
button: "OK",
});
}
info
sweetAlertSample.jsfunction iconSample3(){
swal({
title: "info",
text: "infoのicon",
icon: "info",
button: "OK",
});
}
warning
sweetAlertSample.jsfunction iconSample4(){
swal({
title: "warning",
text: "warningのicon",
icon: "warning",
button: "OK",
});
}
Reference
이 문제에 관하여(SweetAlert에 메시지 표시), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/saitohsan/items/1481630a6d73af493a6c
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
function basicSample(){
swal("基本の使い方");
}
function basicSample2(){
swal("ここにタイトル!", "そして、ここにテキスト!");
}
function basicSample3(){
swal("アイコンつき!", "ボタンも付いてる!", "success");
}
function iconSample1(){
swal({
title: "success",
text: "successのicon",
icon: "success",
button: "OK",
});
}
function iconSample2(){
swal({
title: "error",
text: "errorのicon",
icon: "error",
button: "OK",
});
}
function iconSample3(){
swal({
title: "info",
text: "infoのicon",
icon: "info",
button: "OK",
});
}
function iconSample4(){
swal({
title: "warning",
text: "warningのicon",
icon: "warning",
button: "OK",
});
}
Reference
이 문제에 관하여(SweetAlert에 메시지 표시), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/saitohsan/items/1481630a6d73af493a6c텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)