자료/Javascript

aquamsgBox example (예제) - 경고창(Alert) 모달창

네오블루 2008. 10. 13. 23:06
aquamsgBox example (예제)
  1. window Alert Message <INPUT onclick="aquamsgexample(0);" type="button" value="Click" name="example_btn">
  2. aquamsgBox Default Message <INPUT onclick="aquamsgexample(1);" type="button" value="Click" name="example_btn">
  3. aquamsgBox icon change Message <INPUT onclick="aquamsgexample(2);" type="button" value="Click" name="example_btn">
  4. aquamsgBox icon button change Message <INPUT onclick="aquamsgexample(3);" type="button" value="Click" name="example_btn">
aquamsgBox example script (예제 스크립트)
  1. window.alert('window.alert click');
  2. aquamsgBox.show('', '', aquamsgreturnexample);
  3. aquamsgBox.show('아이콘 변경 메세지 박스', '총 4 가지의 아이콘 제공', aquamsgreturnexample, null, 3);
  4. aquamsgBox.show('아이콘, 버튼 변경 메세지 박스', '총 4 가지의 아이콘 제공\n버튼수 무제한\n기본 focus 버튼 지정 가능', aquamsgreturnexample, '예|아니오|취소|재시도;아니오', 4);
  • aquamsgBox.show(상단타이틀, 메세지 내용, 버튼 클릭시 연결함수, 버튼, 아이콘 이미지);
  • - 연결함수 함수명을 적어줘야 함. 버튼값을 가져올때는 aquamsgBox.getValue();
  • - 버튼 (예|아니오|취소|재시도) 기본 포커스가 "예" 에 감.
  • - 버튼 (예|아니오|취소|재시도;아니오) 기본 포커스가 "아니오" 에 감
  • - 아이콘 1 : 풍선 느낌표 , 2 : 풍선 물음표 , 3 : 노란 느낌표 , 4 : 빨간 경고
function aquamsgreturnexample() {
var example_result = document.getElementById('example_result');
if (example_result) example_result.innerHTML += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- ' + aquamsgBox.getValue() + ' 클릭<br />';
}
Result Message
window.alert 버튼 클릭
aquamsgBox 기본 메세지 박스 클릭
      - OK 클릭
aquamsgBox 아이콘 변경 메세지 박스 클릭
      - OK 클릭
aquamsgBox 아이콘, 버튼 변경 메세지 박스 클릭
      - 재시도 클릭
aquamsgBox 아이콘, 버튼 변경 메세지 박스 클릭
      - 취소 클릭
aquamsgBox 아이콘 변경 메세지 박스 클릭
      - OK 클릭
aquamsgBox 기본 메세지 박스 클릭
      - OK 클릭
aquamsgBox 기본 메세지 박스 클릭
      - OK 클릭
aquamsgBox 기본 메세지 박스 클릭
      - OK 클릭
aquamsgBox 아이콘 변경 메세지 박스 클릭
      - close 클릭
aquamsgBox 아이콘, 버튼 변경 메세지 박스 클릭
      - 취소 클릭
aquamsgBox 기본 메세지 박스 클릭
      - OK 클릭
aquamsgBox 기본 메세지 박스 클릭
      - OK 클릭
window.alert 버튼 클릭