[Free] Get all latest Microsoft 70-480 Actual Tests 161-170

Ensurepass

QUESTION 161

You develop an HTML5 application. The application uses an image that is returned from an HTTP POST request.

 

You develop the following code: (Line numbers are included for reference only.)

 

clip_image001

 

You need to display the loaded image in the application.

 

Which code segment should you insert at line 04?

 

clip_image003

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: B

 

 

QUESTION 162

You develop an HTML5 webpage that contains the following HTML markup:

 

<input id=”loanTermTextBox” type=”text” />

 

Users must enter a valid integer value into the text box.

 

You need to validate the data type that is received from the input element.

 

Which two code segments should you include on the webpage? (Each correct answer presents a complete solution. Choose two.)

clip_image005

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

 

Correct Answer: AB

 

 

QUESTION 163

You develop an HTML5 application for a company. Employees must enter a personal identification number (PIN) in an INPUT element named SecurityCode to access their employee records.

 

The SecurityCode element must meet the following requirements:

 

clip_image007Allow up to 6 digits.

clip_image007[1]Do not display numbers as they are entered.

clip_image007[2]Display the text Enter PIN Code before the user enters any data.

 

You need to implement the SecurityCode element.

 

Which HTML markup should you add to the application?

 

clip_image008

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

 

Correct Answer: D

Explanation:

* The isNaN() function determines whether a value is an illegal number (Not- a-Number).

This function returns true if the value is NaN, and false if not.

* JavaScript Form Validation

JavaScript can be used to validate data in HTML forms before sending off the content to a server.

 

Form data that typically are checked by a JavaScript could be:

 

clip_image007[3]has the user left required fields empty?

clip_image007[4]has the user entered a valid e-mail address?

clip_image007[5]has the user entered a valid date?

clip_image007[6]has the user entered text in a numeric field?

 

* document.getElementByID

Returns a reference to the element by its ID.

Syntax

element = document.getElementById(id);

where

element is a reference to an Element object, or null if an element with the specified ID is not in the document.

id is a case-sensitive string representing the unique ID of the element being sought.

 

* The getElementsByName() method accesses all elements with the specified name. Gets a collection of objects based on the value of the NAME or ID attribute.

Syntax

document.getElementsByName(name)

 

 

QUESTION 164

DRAG DROP

You develop an HTML5 webpage. You have the following HTML markup:

 

clip_image009

 

You need to update the content of the DIV element when the mouse hovers over an image and when the mouse coordinates change.

 

How should you complete the relevant code? (To answer, drag the appropriate code segment to the correct location or locations in the answer area. Use only code segments that apply.)

 

clip_image011

 

Correct Answer:

clip_image013

 

 

QUESTION 165

HOTSPOT

You are creating a custom CSS3 style.

 

You have the following requirements to complete the style:

 

clip_image007[7]Box1 has a red outline.

clip_image007[8]Box1 contains box2, and box2 must remain inside box1.

clip_image007[9]Box2 must have a green to black gradient.

clip_image007[10]Box2 must be surrounded by white space.

 

The style resembles the following diagram:

 

clip_image014

 

You need to add the CSS3 code to the styles.

 

How should you complete the relevant code? (To answer, select the appropriate code segment in each drop-down list in the answer area.)

 

clip_image015

 

clip_image016

 

Correct Answer:

clip_image017

 

 

 

 

 

 

 

 

 

 

 

 

 

QUESTION 166

You develop an application to host user-generated HTML and JavaScript content.

 

A common error handler in your application must process all unhandled errors.

 

You need to implement global error handling for the application.

 

Which code segment should you use?

 

clip_image018

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: A

 

 

QUESTION 167

You are creating a custom function. You pass an object named testObj to the function as a parameter. You do not use inheritance through the functions.

 

The function must establish whether testObj inherits from another object named parentObj.

 

You need to ensure that the function performs as required.

Which method or operator should you add to the function?

 

A.

parentObj.instanceof(testObj)

B.

testObj.isPrototypeOf(parentObj)

C.

testObj.instanceof(parentObj)

D.

parentObj.isPrototypeOf(testObj)

 

Correct Answer: B

 

 

QUESTION 168

You develop an HTML5 webpage. You have the following HTML markup:

 

clip_image020

 

You need to call the click event for the addOneltem button a determined number of times when the user clicks the addBoxOfltems button.

 

Which code segment should you add to the webpage?

 

clip_image021

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: D

 

 

QUESTION 169

HOTSPOT

You are validating user input by using built-in JavaScript functions.

 

The application must:

 

clip_image007[11]Store the value that is entered in a variable named inputValue

clip_image007[12]Use the built-in isNaN(tnputValue) function to evaluate the data type

 

You need to validate the return value of the isNaN(inputValue) function.

 

Which values will be returned? (To answer, configure the appropriate options in the dialog box in the answer area.)

 

clip_image022

 

clip_image023

 

Correct Answer:

clip_image024

 

 

QUESTION 170

You develop an HTML application that is located at www.adventure-works.com. The application must load JSON data from www.fabrikam.com.

 

You need to choose an approach for loading the data.

 

What should you do?

 

A.

Add a crossdomain.xml file to the second server.

B.

Configure Cross-Origin Resource Sharing (CORS) on the servers.

C.

Load the data in a JavaScript timeout callback.

D.

Reference the remote data as an XML resource.

 

Correct Answer: B

 

 

Instant Access to Download Testing Software & PDF File for Microsoft 70-480 Real Exam

Instant Access to Try Microsoft 70-480 Free Demo

This entry was posted in 70-480 Actual Tests and tagged , , , , , . Bookmark the permalink.