Free Practice Exam - MCPD 70-562
Control Panel
Exam Progress
Move on to the next question
Links
Home
Microsoft Exams
Question 2
You have created a new Javascript file that contains functions which manipulate elements of the DOM including hiding and showing DIVS depending on certain conditions. This Javascript file contains a function called ShowHide() that kicks off the process of determining whether content should be hidden or shown. You want this function to be called only after a page has finished loading on the clients browser. Which event should you use?
<form onload=" ShowHide()">
None of these
<head onload=" ShowHide()">
<body onload=" ShowHide()">
That was the correct answer, well done!
Sorry, that was the wrong answer
The correct answer is body onload. This event fires when the body of the html document has fully loaded on the clients machine. It’s a great place to manipulate DOM elements because they will all have been loaded by this stage.
Sponsored
Free practice exams are provided free of charge by Accelerated Ideas. Please respect our exams and do not reproduce our material or abuse the testing system. Thank you. Microsoft exams for MCPD, MCTS, MCP, MCSE, MCSA, MCAD, MCSD