티스토리 뷰

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>자바스크립트 오류던지기</title>

<script language="javascript" type="text/javascript">
//<![CDATA[
// 모든 오류를 디버그 콘솔에 던지기

window.onerror = function(msg, url, linenumber) {
    if(typeof console != 'undefined' && typeof console.log != 'undefined') {
        console.log('Error message: '+msg+'\nURL: '+url+'\nLine Number: '+linenumber);
    }
    return true;
}
//]]>
</script>

'웹프로그래밍 > js' 카테고리의 다른 글

Scriptaculous SelectBox  (0) 2009.08.25
마우스 오버 스크롤 메뉴  (2) 2009.07.07
Shadowbox.js  (0) 2009.05.07
prototype & scriptaculous 이용한 간단한 slide show  (0) 2009.05.07
Floatbox (최고의 javascript windowing system)  (0) 2009.04.30
댓글