Some times the script refers to the location that existed at special location when the script was written, but the location change at the later time so the loading script is invalid. In these case browser is display the error message to the client user, so the user confused with the error message. To prevent error dialog box to handle error with onerror event.By through using this onerror event it will display there error message in the browser status bar.Note: this program work correctly if “script debugging” is disabled in browser. how to disabled Tool->internet option->advance tab->disable script debugging under browsing Error: alrt("welcome to our page"); This code has error alrt so it will display error message in the status bar. <html> <head><title>STUDENTWEBSITE</title> <script language="javascript">window.onerror=handleError; function okp() { alrt("welcome to our page"); }
0 Comments