JavaScript Reference/Event Handlers Reference/onError

Материал из Web эксперт
Перейти к: навигация, поиск

"onError" Example

   <source lang="javascript">
   

<html> <head> <script language="JavaScript">

  window.onerror = alert("Errors")

</script> </head> <body> </body> </html>


     </source>
   
  


"onError" is applied to

   <source lang="javascript">

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

     </source>
   
  


"onError" Properties

   <source lang="javascript">

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

     </source>
   
  


"onError" Syntax and Note

   <source lang="javascript">

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.
   


     </source>