返回顶部

收藏

Javascript 处理页面上的错误

更多
<script type="text/javascript">
onerror=HandleError

function HandleError(msg,url,l)
{
    var txt=""
    txt="There was an error on this page.\n\n"
    txt+="Error: " + msg + "\n"
    txt+="URL: " + url + "\n"
    txt+="Line: " + l + "\n\n"
    txt+="Click OK to continue.\n\n"
    alert(txt)
    return true
}
</script>

标签:Javascript,页面,错误

收藏

0人收藏

支持

0

反对

0

发表评论