QUESTION 131

DRAG DROP

You are developing a shared library to format information. The library contains a method named _private.

 

The _private method must never be called directly from outside of the shared library.

 

You need to implement an API for the shared library.

 

How should you complete the relevant code? (Develop the solution by selecting the

required code segments and arranging them in the correct order. You may not need all of the code segments.)

 

clip_image002

 

Correct Answer:

clip_image004

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

QUESTION 132

You develop an HTML application that contains a table that displays a list of products. The table is defined with the following HTML markup:

 

clip_image006

 

You must style the table to look like the following image:

 

clip_image008

 

You need to implement the CSS selectors to select the rows that must have a blue background.

 

Which CSS selector should you use?

 

A.

thead:only-child, tbody:after, table:before

B.

tr [line |-0, 1, 3]

C.

tr:first-of-type, tr:last-of-type

D.

tr:first-line, tr:last-child

 

Correct Answer: C

Explanation:

tr.first-of-type

The :first-of-type selector matches every element that is the first child, of a particular type, of its parent.

Here the first line of table.

 

tr.last-of-type

The :last-of-type pseudo-class represents an element that is the last sibling of its type in the list of children of its parent element.

 

 

QUESTION 133

You develop a webpage by using HTML5. You create the following markup:

 

<input type “url” name= “website” required=”required” />

 

You need to ensure that the value that the user enters contains a secure URL.

 

What should you do?

 

A.

Add the following attribute to the input tag: value=”https://v

B.

Add the following attribute to the input tag: pattern=”https://.+”

C.

Add the following attribute to the input tag: value=”ssl”

D.

Add the following attribute to the input tag: itemtype=”https”

 

Correct Answer: B

Explanation:

Note:

* The pattern attribute is supported in Internet Explorer 10, Firefox, Opera, and Chrome.

* The pattern attribute specifies a regular expression that the <input> element’s value is checked against.

* The pattern attribute works with the following input types: text, search, url, tel, email, and password

 

 

QUESTION 134

You develop a webpage by using HTML5. You create the following markup and code: (Line numbers are included for reference only.)

 

clip_image010

 

You need to ensure that the values that users enter are only numbers, letters, and underscores, regardless of the order.

 

Which code segment should you insert at line 04?

 

clip_image012

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D< /p>

 

Correct Answer: A

Explanation:

Example:

Sometimes situations arise when user should fill a single or more than one fields with alphabet characters (A-Z or a-z) in a HTML form. You can write a JavaScript form validation script to check whether the required field(s) in the HTML form contains only letters. – See more at: http://www.w3resource.com/javascript/form/all-letters- field.php#sthash.5Db50Bdm.dpuf

 

Javascript function to check for all letters in a field view plainprint?

 

function allLetter(inputtxt)

{

var letters = /^[A-Za-z]+$/;

if(inputtxt.value.match(letters))

{

return true;

}

else

{

alert(“message”);

return false;

}

}

 

To get a string contains only letters (both uppercase or lowercase) we us
e a regular expression (/^[A-Za-z]+$/) which allows only letters. Next the match() method of string object is used to match the said regular expression against the input value. Here is the complete web document.  See more at:

http://www.w3resource.com/javascript/form/all-letters- field.php#sthash.5Db50Bdm.dpuf

 

 

QUESTION 135

HOTSPOT

You develop an interactive scalable vector graphics (SVG) application. You write the following HTML markup that makes a rectangle rotate:

 

clip_image014

 

You need to control the speed of the rotating rectangle.

 

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

 

clip_image016

 

clip_image018

 

Correct Answer:

clip_image020

 

 

 

 

 

 

 

 

 

QUESTION 136

DRAG DROP

You create a webpage that includes the following HTML markup: (Line numbers are included for reference only.)

 

clip_image022

 

You need to ensure that a form cannot be submitted unless the INPUT element contains the word OK.

 

Which five actions should you perform in sequence? (To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.)

 

clip_image024

 

Correct Answer:

clip_image026

 

 

QUESTION 137

DRAG DROP

You are implementing a web worker by using JavaScript and HTML5. The web worker processes a long-running loop and returns the result to a webpage.

 

The web worker is defined on the webpage as follows:

 

clip_image028

 

You have the following requirements:

 

clip_image030Evaluate the message value in the web worker.

clip_image030[1]Process the loop based on the iterations value that is passed from the webpage.

clip_image030[2]Return a value back to the webpage from the web worker.

 

You need to implement the web worker.

 

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_image032

 

Correct Answer:

clip_image034

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

QUESTION 138

HOTSPOT

 

clip_image036

 

Ho
w does the page render? For each statement in the table, select Yes if the behavior is described. Select No if it is not. Make only one selection in each column.

 

clip_image038

 

Correct Answer:

clip_image040

 

 

QUESTION 139

You are creating an HTML5 application that allows users to play video on a page by using the VIDEO element.

 

You need to enable the user to start, stop, and pause the video.

 

Which line of code should you add to the page?

 

A.

<video id= “myVideo” height=”320″ width=”400″ src=”myVideo.vtt” contextmenu=”pauseplay”> </video>

B.

<video id=”myVideon heigh”=”320″ width=”400″ src=”myVideo.vtt” controls> </video>

C.

<video _d=”myVideon height=”320″ width=”400″ src=”myVideo.vtt” autoplay> </video>

D.

<video id=”myVideo” height=”320″ width=”400″ src=”myVideo.vtt” contextinenu=”Startstopn> </video>

 

Correct Answer: B

 

 

QUESTION 140

You are creating a web page that contains a canvas with text.

 

The page contains the following JavaScript code. (Line numbers are included for reference only.)

 

clip_image042

 

The text on the canvas must rotate 90 degrees when a user clicks a button on the page.

 

You need to ensure that the text rotates when the user clicks the button.

 

Which line of code should you add at line 03?

 

A.

context.transform(90);

B.

context.content.getRotation(90);

C.

context.rotate(90);

D.

context.content.rotate (90);

 

Correct Answer: C

 

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…