The onerror event fires whenever an error occurs loading the window object.
This example generates an error because of an unknown object being called on a script. The onerror event is used here to trigger a function which displays a custom alert message.
© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.