Ensurepass

QUESTION 171

You are creating a blog site by using HTML5 and JavaScript. An inline frame enables users to post comments. It is possible for users to inject malicious scripts into their comments.

 

You need to minimize the ability for malicious scripts to execute on the site.

 

Which line of code should you use?

 

A.

<iframe sandbox src=”frame1.htmlnX/iframe>

B.

<iframe seamless=”allowscripts” src=”frame1.html”<>/iframe>

C.

<iframe seamless src=”frame1.html”></iframe>

D.

<iframe sandbox=”allowscripts” src”frame1.html”x/iframe>

 

Correct Answer: A

 

 

QUESTION 172

You develop an HTML5 application that interacts with a REST service. The REST service accepts JSON data. A JavaScript object named form Data contains data that is sent to the REST service.

 

You need to convert the JavaScript object named formData into JSON.

 

Which code segment should you use?

 

A.

jQuery.ajax.valueOf(formData);

B.

window.evai(formData);

C.

JSON.stringify (formData);

D.

formData.toString();

 

Correct Answer: C

 

 

QUESTION 173

You are developing an HTML page that includes the following code.

 

<h1 id=”header”>A Static Page</hl>

 

You need to modify the content of the HI element dynamically by using JavaScript.

 

Which code segment should you use?

 

image391

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: D

 

 

QUESTION 174

DRAG DROP

You are developing an HTML5 web application that will display encyclopedia entries.

 

Each encyclopedia entry has an associated image that is referred to in the entry.

 

You need to display the image by using the correct semantic markup.

 

What should you do? (To answer, drag the appropriate HTML tag to the correct element. Each tag 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.)

 

image393

 

Correct Answer:

image395

 

 

QUESTION 175

You are developing a web page that will contain an animated logo. The web page currently has a logo image on a canvas object.

 

You need to spin the logo image on the canvas.

 

Which method should you use?

 

A.

context.rotate()

B.

context.spin()

C.

context.translatePosition()

D.

context.setTransform()

 

Correct Answer: A

 

 

QUESTION 176

You are developing a web page that includes the following HTML.

 

<span id=”myTextSpan” class=”myStyle”>Hello, World!</Span>

 

You need to use inline CSS styling to format the text with Arial font.

 

Which code segment should you use?

 

image397

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: B

 

 

 

 

 

 

 

QUESTION 177

You create the following JavaScript code:

 

image399

 

You have the following requirements:

 

image006You must invoke a function that displays the vehicle information within the following HTML element: <div id=”display”x/div>

image006[1]The output of the function must appear on the webpage as follows: Vehicle Color is silverStay safe!Vehicle TransmissionType is manualBig machine!

 

You need to invoke the JavaScript function to display the required output in the HTML element.

 

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

 

image401

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

 

Correct Answer: CE

 

 

QUESTION 178

You develop an HTML5 webpage. You have the following JavaScript code:

 

image402

 

You need to handle the click event when a user clicks the show/Dialog button.

 

Which code segment should you insert at line 02?

 

A.

$ (document).trigger(“click”, “#showDialog”, function (e) {

B.

$ (document).on (“#showDialog”, “click”, function (e) {

C.

$(document).toggle(“click”, “#showDialog”, function (e) {

D.

$(document).on(“click”, “#showDialog”, function (e) {

 

Correct Answer: D

 

 

QUESTION 179

You are developing an application that processes order information. Thousands of orders are processed daily. The application includes the following code segment. (Line numbers are included for reference only.)

 

image403

 

The application must:

 

image006[2]Display the number of orders processed and the number of orders remaining

image006[3]Update the display for every 25th record processed

 

You need to develop the application to meet these requirements.

 

Which line of code should you insert at line 04?

 

A.

if (!(counter % 25))

B.

if (counter == 25)

C.

if (counter >> 25 == 0)

D.

if (counter >> 25 == 0)

 

Correct Answer: A

 

 

QUESTION 180

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

 

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

 

You need to prevent users from entering specific characters into the username field.

 

What should you do?

 

A.

Using the keyup event, add an anonymous function that returns true when a specific character keycode value is determined.

B.

Using the change event, add an anonymous function that returns true when a specific character keycode value is determined.

C.

Using the keydown event, add an anonymous function that returns false when a specific character keycode value is determined.

D.

Using the change event, add an anonymous function that returns false when a specific

character keycode value is determined.

 

Correct Answer: B

 

Instant Access to Download Latest Complete Collection of Microsoft 70-480 Real Exam

Try Microsoft 70-480 Free Demo