JavaScript Reference/Event Handlers Reference/onError

Материал из Web эксперт
Версия от 18:30, 25 мая 2010; (обсуждение)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"onError" Example

    
<html>
<head>
<script language="JavaScript">
   window.onerror = alert("Errors")
</script>
</head>
<body>
</body>
</html>



"onError" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<img>                           <object>                      |
|                |<style>                         window                        |
+----------------+--------------------------------------------------------------+



"onError" Properties

+----------------+--------------------------------------------------------------+
| Properties     |altKey                          altLeft                       |
|                |ctrlLeft                        returnValue                   |
|                |shiftLeft                       type                          |
+----------------+--------------------------------------------------------------+



"onError" Syntax and Note

Note:
    
This event fires when an object-loading operation fails. 
This may occur for any number of reasons, such as 
    1)referencing an object that has not been instantiated, 
    2)calling a function that does not exist, or 
    3)referencing a variable that was not declared.