Ensurepass

QUESTION 91

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?

 

A.       

clip_image002

B.       

clip_image003

C.       

clip_image004

D.       

clip_image005

 

Correct Answer: B

 

 

QUESTION 92

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

 

A.       

clip_image007

 

B.       

clip_image009

 

C.       

clip_image011

 

D.       

clip_image013

 

E.        

clip_image015

 

Correct Answer: AB

 

 

QUESTION 93

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:

 

Ÿ   Allow up to 6 digits.

Ÿ   Do not display numbers as they are entered.

Ÿ   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?

 

A.       

clip_image016

 

B.       

clip_image017

 

C.       

clip_image018

 

D.       

clip_image019

 

E.        

clip_image020

 

Correct Answer: D

 

 

QUESTION 94

DRAG DROP

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

 

clip_image021

 

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.

 

Select and Place:

clip_image023

 

Correct Answer:

clip_image025

 

 

QUESTION 95

HOTSPOT

You are creating a custom CSS3 style. You have the following requirements to complete the style:

 

Ÿ   box1 has a red outline.

Ÿ   box1 contains box2, and box2 must remain inside box1

Ÿ   box2 must have a green to black gradient.

Ÿ   box2 must be surrounded by white space.

 

The style resembles the following diagram:

 

clip_image026

 

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_image027

 

Hot Area:

clip_image028

 

Correct Answer:

clip_image029

 

 

QUESTION 96

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?

 

A.       

clip_image030

 

B.       

clip_image031

 

C.       

clip_image032

 

D.       

clip_image033

 

Correct Answer: A

 

 

QUESTION 97

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: D

 

 

QUESTION 98

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

 

clip_image035

 

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?

 

A.       

clip_image036

 

B.       

clip_image037

 

C.       

clip_image038

 

D.       

clip_image039

 

Correct Answer: D

 

 

QUESTION 99

HOTSPOT

You are validating user input by using built-in JavaScript functions. The application must:

 

Ÿ   Store the value that is entered in a variable named inputValue

Ÿ   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_image040

 

Hot Area:

clip_image041

 

Correct Answer:

clip_image042

 

 

QUESTION 100

DRAG DROP

You are validating user input by using JavaScript and regular expressions. A group of predefined regular expressions will validate two input fields:

 

Ÿ   An email address in a function named validateEmail (for example, firstname@contoso.com)

Ÿ   A nine-digit number that allows optional hyphens after the second and fifth character in a function named validateSSN(for example, 555555555 or 555-55-5555)

 

You need to use the correct expression to validate the input. Which expression should you insert into each function?

 

To answer, drag the appropriate regular expression statement to the correct location. Each regular expression statement 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.

 

Select and Place:

clip_image044

 

Correct Answer:

clip_image046

 

 

Comments are closed.