PrepAway - Latest Free Exam Questions & Answers

Which code segment should you insert at line 12?

You are creating a Virtual Earth 6.0 map. You use a page template that has a transparent header. You write the following HTML fragment to define the template.
01 <head>
02 <script type=”text/javascript”>
03 var map = null;
04 function GetMap(){
05 FormatMap();
06 map = new VEMap(‘Map’);
07 map.LoadMap();
08 }
09 function FormatMap(){
10 var mapEl = document.getElementById(‘Map’);
11 var headEl = document.getElementById(‘Header’);
12 …
13 }

14 </head>
15 <body onload=”GetMap();”>
16 <div id=’Header’ style=”position: relative; left: 5px; top:
5px; width:400px; height:100px; border: 2px solid black;”> 17 Header
18 </div>
19 <div id=’Map’></div>
20 </body>

You need to position the map so that the header is overlaid on the map and centered at the top.

Which code segment should you insert at line 12?

PrepAway - Latest Free Exam Questions & Answers

A.
mapEl.style.position = “absolute”;
mapEl.style.top = “5px”;
mapEl.style.left = “5px”;
mapEl.style.width = “400px”;
mapEl.style.height = “400px”;
mapEl.style.zIndex = -1;

B.
mapEl.style.position = “absolute”;
mapEl.style.top = “5px”;
mapEl.style.left = “5px”;
mapEl.style.width = headEl.style.width;
mapEl.style.height = headEl.style.height;
mapEl.style.zIndex = 0;

C.
mapEl.style.position = headEl.style.position;
mapEl.style.top = headEl.style.top;
mapEl.style.left = headEl.style.left;
mapEl.style.width = headEl.style.width;
mapEl.style.height = headEl.style.height;
mapEl.style.zIndex = -1;

D.
mapEl.style.position = headEl.style.position;
mapEl.style.top = headEl.style.top;
mapEl.style.left = headEl.style.left;
mapEl.style.width = headEl.style.width;
mapEl.style.height = headEl.style.height;
mapEl.style.zIndex = headEl.style.zIndex;


Leave a Reply