JavaScript

에러 메시지 대화 상자 표시
  • 조회수 2,670
  • 작성일 2008-09-23
  •  
 
에러 메시지 대화 상자 표시


 window.onerror = function(msg, url, line) {
  if (onerror.num++ < onerror.max) {
   alert("ERROR: " + msg + "\n" + url + ":" + line);
   return true;
  }
 }
 onerror.max = 3;
 onerror.num = 0;