Email: office@yourdomain.com
Phone:: +44 20 7240 9319
back to top

Blog

색다른 alert 알림창 라이브러리 alertifi 배웠으니 써먹자!

색다른 alert 알림창 라이브러리 alertify 배웠으니 써먹자!

AlertifyJS는 기본 브라우저 대화 상자를 대체 할뿐만 아니라 자신 만의 대화 상자를 매우 쉽게 만들 수 있습니다!

기본 대화 상자

alertify 
  .alert("이것은 경고 대화 상자입니다.", function(){ 
   alertify.message('확인'); 
});
alertify.confirm("이것은 확인 대화 상자입니다.",
  function(){
    alertify.success('확인');
  },
  function(){
    alertify.error('취소');
  });
alertify.prompt("이것은 프롬프트 대화 상자입니다.", "값을 입력하세요.",
  function(evt, value ){
    alertify.success('확인: ' + value);
  },
  function(){
    alertify.error('취소');
  })
  ;

기본 알림

  // success notification
  // Shorthand for:
  // alertify.notify( message, 'success', [wait, callback]);
  alertify.success('Success message');
  // error notification
  // Shorthand for:
  // alertify.notify( message, 'error', [wait, callback]);
  alertify.error('Error message');
  // warning notification
  // Shorthand for:
  // alertify.notify( message, 'warning', [wait, callback]);
  alertify.warning('Warning message');
  // default notification
  // Shorthand for:
  // alertify.notify( message, [type, wait, callback]);
  alertify.message('Normal message');

No Comments

Leave a Comment