[Free] Download New Updated (October 2016) Microsoft 70-480 Real Exam 21-30

Ensurepass

QUESTION 21

HOTSPOT

You are creating a web worker for an HTML5 application.

 

The following tasks must be performed from within the web worker:

 

clip_image002Register an event listener for the web worker

clip_image002[1]Start and stop the web worker

 

You need to define a function that performs the required tasks.

 

Which code segment should you use? (To answer, select the appropriate option from the drop-down list in the answer area.)

 

clip_image004

 

clip_image006

 

Correct Answer:

clip_image008

 

 

 

 

 

 

 

QUESTION 22

You are creating a JavaScript function that displays the name of a web application.

 

You declare the following button element.

 

<input type=”button” id= “About” value=”About” />

 

When a user clicks the button, a JavaScript function named About must be called.

 

You need to create an event handler that calls the About function when the button is clicked.

 

Which two code segments can you use? (Each correct answer presents a complete solution. Choose two.)

 

clip_image010

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: CD

Explanation:

http://help.dottoro.com/ljeuqqoq.php

http://help.dottoro.com/ljinxrmt.php

 

 

 

 

 

 

 

 

 

 

 

 

 

 

QUESTION 23

HOTSPOT

You are creating a function by using JavaScript. The function accepts an object as the parameter and returns a string that identifies the data type of the object.

 

You have the following requirements:

 

clip_image002[2]The function must return “Number” if the object is a number.

clip_image002[3]The function must return “String” if the object is a string.

clip_image002[4]The function must return “Unknown” if the object is neither a number nor a string.

 

You need to implement the function to meet the requirements.

 

How should you build the code segment? (To answer, select the appropriate options from the drop-down lists in the answer area.)

 

clip_image012

 

clip_image014

 

Correct Answer:

clip_image016

QUESTION 24

You need to test the value of the following variable in JavaScript.

 

var length = “75”;

 

A block of code must execute if the length equals 75 regardless of the data type.

 

You need to use the statement that meets this requirement.

 

Which lines of code should you use? (Each correct answer presents a complete solution.

Choose two.)

 

A.

if (length = = = 75)

B.

if (length = = 75)

C.

if (length! = 75)

D.

if (length = = “75”)

 

Correct Answer: BD

 

 

QUESTION 25

You are developing an application that uses a third-party JavaScript library named doWork().

 

The library occasionally throws an “object is null or undefined” error with an error code of -2146823281.

 

The application must:

 

clip_image002[5]Extract and handle the exceptions thrown by doWork()

clip_image002[6]Continue normal program execution if other exceptions occur

 

You need to implement the requirements.

 

Which code segment should you use?

 

clip_image018

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: C

 

 

QUESTION 26

You are troubleshooting a web page that includes the following code. (Line numbers are included for reference only.)

 

clip_image020

 

What is displayed in the alert from line 11?

 

A.

Div

B.

Function

C.

Button

D.

Document

 

Correct Answer: C

 

 

QUESTION 27

You are developing a web application that consumes services from a third-party application. A web worker processes the third-party application requests in the background. A page in the application instantiates the web worker process.

 

You need to establish two-way communications between the web worker process and the page.

 

Which two actions will achieve this goal? (Each correct answer presents a complete solution. Choose two.)

 

A.

From the web worker, use the onconnect event handler of the main page to capture events.

B.

From the main page, use the onmessage event handler of the web worker to capture events.

C.

From the web worker, use the onmessage event handler of the main page to capture events.

D.

From the main page, use the onconnect event handler of the web worker to capture events.

 

Correct Answer: BC

Explanation:

http://www.w3schools.com/html/html5_serversentevents.asp

http://www.html5rocks.com/en/tutorials/workers/basics/

 

 

 

QUESTION 28

You are developing an HTML5 web application that displays customer mailing address information.

 

The application loads addresses from a web service by using AJAX. The following code defines a Customer object and loads address data.

 

clip_image022

 

You need to implement the loadAddress function.

 

Which code segment should you use?

 

clip_image024

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: C

 

 

QUESTION 29

You are developing an HTML5 web page.

 

The appearance of the text box must change when a user moves the focus to another element on the page.

 

You need to develop the page to respond to user action.

 

Which line of code should you use?

 

A.

<input type=”text” onblur=”resetStyle(this);” />

B.

<input type=”text” onfocus=”resetStyle(this);” />

C.

<input type=”text” onreset=”resetStyle(this);” />

D.

<input type=”text” onselect=”resetStyle(this);” />

 

Correct Answer: A

Explanation:

http://www.w3schools.com/jsref/event_onblur.asp

 

 

QUESTION 30

DRAG DROP

You are developing an online shopping application that accepts credit cards for payment.

 

If the credit card number is invalid, the application must:

 

clip_image002[7]Generate an error

clip_image002[8]Assign “200” to the error number

clip_image002[9]Assign “Invalid” to the error description

 

You need to write the code that meets the requirements.

 

How should you write the code? (To answer, drag the appropriate code segment or segments to the correct location in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

 

clip_image026

 

Correct Answer:

clip_image028

 

 

Free VCE & PDF File for Microsoft 70-480 Real Exam

Instant Access to Free VCE Files: MCSE|MCSA|MCITP…
Instant Access to Free PDF Files: MCSE|MCSA|MCITP…