@blog.justoneplanet.info

日々勉強

例外をキャッチ

try{
    window.addEventListener(
        'load',
        function(){
            alert('test');
        },
        false
    );
}
catch(e){
    alert(e.constructor);
    alert(e.message);
    alert(e.name);
    alert(e.fileName);//mozilla
    alert(e.lineNumber);//mozilla
    alert(e.stack);//mozilla
    alert(e.description);//ie
    alert(e.number);//ie
}

コメントはまだありません»

No comments yet.

RSS feed for comments on this post.TrackBack URL

Leave a comment