Free Download New Updated Microsoft 70-480 Real Exam Questions and Answers 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.)

 

image368

 

You need to display the loaded image in the application.

 

Which code segment should you insert at line 04?

 

image370

 

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.)

image372

 

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:

 

image006Allow up to 6 digits.

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

image006[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?

 

image373

 

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:

 

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

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

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

image006[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:

 

image374

 

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.)

 

image376

 

Correct Answer:

image378

 

 

QUESTION 165

HOTSPOT

You are creating a custom CSS3 style.

 

You have the following requirements to complete the style:

 

image006[7]Box1 has a red outline.

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

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

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

 

The style resembles the following diagram:

 

image379

 

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.)

 

image380

 

image381

 

Correct Answer:

image382

 

 

 

 

 

 

 

 

 

 

 

 

 

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?

 

image383

 

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:

 

image385

 

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?

 

image386

 

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:

 

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

image006[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.)

 

image387

 

image388

 

Correct Answer:

image389

 

 

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 Latest Complete Collection of Microsoft 70-480 Real Exam

Try Microsoft 70-480 Free Demo