Write a program to exaplain the deferred scripts using event handlers in JavaScript?

Submitted by: Administrator
Event handler allows a trigger to be generated when a user action takes place like clicking a button, clicking on images, etc. OnLoad is an event handlers that handles all of the page's components that includes images, Java applets, and embedded multimedia to laod it in browser. The event handlers are mostly used in <BODY> tag. Event handler is also used to run several internal script statements such that it is better to use statements in a function definition and event handler invoking the function. The code below shows onLoad event handler triggers the done() function. The function consists of an alert box that gets displayed.
<HTML>
<HEAD>
<TITLE>Event_handler</TITLE>
<SCRIPT LANGUAGE="Text/JavaScript">
<!--
function done()
{
alert("The page has finished loading.")
}
// -->
</SCRIPT>
</HEAD>
<BODY Event_handler="done()">
</BODY>
</HTML>
Submitted by:

Read Online Expert Developer JavaScript Job Interview Questions And Answers