NVS PGT CS 2017 Part-B
October 14, 2023Computer-Networks
October 14, 2023NVS PGT CS 2017 Part-B
|
Question 14
|
Study the code given below:
< HTML >
< HEAD >
< SCRIPT LANGUAGE = “JavaScript” >
function start ()
{
alert (“Event Occured”)
}
< /SCRIPT > < /HEAD >
< BODY onLoad = “Start()” >
< h1 > Guess the event < /H1 >
< /BODY > < /HTML >
How many times will the function Start () be called ?
< HTML >
< HEAD >
< SCRIPT LANGUAGE = “JavaScript” >
function start ()
{
alert (“Event Occured”)
}
< /SCRIPT > < /HEAD >
< BODY onLoad = “Start()” >
< h1 > Guess the event < /H1 >
< /BODY > < /HTML >
How many times will the function Start () be called ?
|
Once every time the system starts.
|
|
|
Once every time the web page is refreshed.
|
|
|
Only once when the window is opened.
|
|
|
Will not be called as the event handler is wrong.
|
Question 14 Explanation:
onload() event is execute a JavaScript immediately after a page has been loaded
Correct Answer: B
Question 14 Explanation:
onload() event is execute a JavaScript immediately after a page has been loaded
