[Free] 2018(June) Dumps4cert Microsoft 70-480 Dumps with VCE and PDF Download 11-20

Dumps4cert.com : Latest Dumps with PDF and VCE Files
2018 May Microsoft Official New Released 70-480
100% Free Download! 100% Pass Guaranteed!

Programming in HTML5 with JavaScript and CSS3

Question No: 11 HOTSPOT – (Topic 1)

You are creating a web worker for an HTML5 application.

The following tasks must be performed from within the web worker:

-> Register an event listener for the web worker

-> Start and stop the web worker

You need to define a function that performs the required tasks.

Which code segment should you use? (To answer, select the appropriate option from the drop-down list in the answer area.)

Dumps4Cert 2018 PDF and VCE

Dumps4Cert 2018 PDF and VCE

Answer:

Dumps4Cert 2018 PDF and VCE

Explanation:

Dumps4Cert 2018 PDF and VCE

  • addEventListener

    The addEventListener() method attaches an event handler to the specified element.

    In context of a worker, both self and this refer to the global scope. The worker can either add an event listener for the message event, or it can define the onmessage handler to listen for any messages sent by the parent thread.

  • postmessage

    Pass a message to the worker.

  • close()

Terminating Workers

Workers are resource-intensive; they are OS-level threads. Therefore, you do no want to create a large number of worker threads, and you should terminate the web worker after it completes its work. Workers can terminate themselves, like this:

self.close();

Question No: 12 – (Topic 1)

You are developing a customer web form that includes the following HTML.

lt;label id=quot;txtValuequot;X/labelgt;

Information from the web form is submitted to a web service. The web service returns the following JSON object.

{

quot;Confirmationquot;: quot;1234quot;, quot;FirstNamequot;: quot;Johnquot;

}

You need to display the Confirmation number from the JSON response in the txtValue label field.

Which JavaScript code segment should you use?

  1. $(quot;#txtValuequot;).val = (JSONObject.Confirmation);

  2. $(quot;#txtValuequot;).val (JSONObject.Confirmation);

  3. $(quot;#txtValuequot;).text = (JSONObject.Confirmation);

  4. $(quot;#txtValuequot;).text (JSONObject.Confirmation);

Answer: D Explanation: Incorrect:

not A, not B: A label object has no value attribute.

Reference: http://api.jquery.com/text/

Question No: 13 – (Topic 1)

You are creating a web form that users will use to enter their personal information. The form includes the following HTML.

Dumps4Cert 2018 PDF and VCE

You have the following requirements:

-> When a user enters an input box, the cell on the right must turn green.

-> When a user leaves an input box, the cell on the right must turn white.

You need to create the web form to meet these requirements.

Which code segment should you use? nth-child

Dumps4Cert 2018 PDF and VCE

  1. Option A

  2. Option B

  3. Option C

  4. Option D

Answer: A

Explanation: * The :nth-child(n) selector matches every element that is the nth child, regardless of type, of its parent.

n can be a number, a keyword, or a formula.

Example

Specify a background color for every lt;pgt; element that is the second child of its parent:

p:nth-child(2) { background: #ff0000;

}

  • parent.next()

    Here: the cell to the right of the current cell. Reference: CSS3 :nth-child() Selector

    Question No: 14 – (Topic 1)

    You are developing a web application that consumes services from a third-party application. A web worker processes the third-party application requests in the background. A page in the application instantiates the web worker process.

    You need to establish two-way communications between the web worker process and the page.

    Which two actions will achieve this goal? (Each correct answer presents a complete solution. Choose two.)

    1. From the web worker, use the onconnect event handler of the main page to capture events.

    2. From the main page, use the onmessage event handler of the web worker to capture events.

    3. From the web worker, use the onmessage event handler of the main page to capture

      events.

    4. From the main page, use the onconnect event handler of the web worker to capture events.

    Answer: B,C

    Explanation: * When postMessage() is called from the main page, our worker handles that message by defining an onmessage handler for the message event.

  • Server-Sent Events – One Way Messaging

A server-sent event is when a web page automatically gets updates from a server.

Receive Server-Sent Event Notifications

The EventSource object is used to receive server-sent event notifications:

Example

var source = new EventSource(quot;demo_sse.phpquot;); source.onmessage = function(event) {

document.getElementById(quot;resultquot;).innerHTML = event.data quot;lt;brgt;quot;;

};

Reference: http://www.w3schools.com/html/html5_serversentevents.asp http://www.html5rocks.com/en/tutorials/workers/basics/

Question No: 15 – (Topic 1)

You are developing an HTML5 web application that displays customer mailing address information.

The application loads addresses from a web service by using AJAX. The following code defines a Customer object and loads address data.

Dumps4Cert 2018 PDF and VCE

You need to implement the loadAddress function. Which code segment should you use?

Dumps4Cert 2018 PDF and VCE

  1. Option A

  2. Option B

  3. Option C

  4. Option D

Answer: C

Question No: 16 – (Topic 1)

You are developing an HTML5 web application and are styling text. You need to use the text-transform CSS property.

Which values are valid for the text-transform property?

  1. hidden

  2. blink

  3. capitalize

  4. line-through

Answer: C

Explanation: CSS Syntax

text-transform: none|capitalize|uppercase|lowercase|initial|inherit;

Example

Transform text in different elements: h1 {text-transform:uppercase;}

h2 {text-transform:capitalize;} p {text-transform:lowercase;}

Reference: CSS text-transform Property http://www.w3schools.com/cssref/pr_text_text-transform.asp

Question No: 17 – (Topic 1)

You are developing a customer web form that includes the following HTML.

lt;input id=quot;txtValuequot; type=quot;textquot; /gt;

A customer must enter a valid age in the text box prior to submitting the form.

You need to add validation to the control. Which code segment should you use?

Dumps4Cert 2018 PDF and VCE

  1. Option A

  2. Option B

  3. Option C

  4. Option D

Answer: D Explanation: val Return value

A string containing the value of the element, or an array of strings if the element can have multiple values

Question No: 18 HOTSPOT – (Topic 1)

You are developing an HTML5 application for a company. You apply the following style to a DIV element on a page.

Dumps4Cert 2018 PDF and VCE

You need to submit a draft illustration of the results of this code.

Which illustration should you submit? (To answer, select the appropriate illustration in the answer area.)

Dumps4Cert 2018 PDF and VCE

Answer:

Dumps4Cert 2018 PDF and VCE

Explanation:

Dumps4Cert 2018 PDF and VCE

Example: div {

border: 3px solid;

background: #b6aaaa; width: 200px;

height: 100px; top 10%;

left 10%;

border-radius: 25px 0px 25px 0px;

}

Result:

Dumps4Cert 2018 PDF and VCE

Question No: 19 – (Topic 1)

You are developing an application that uses a third-party JavaScript library named doWork().

The library occasionally throws an quot;object is null or undefinedquot; error with an error code of

-2146823281.

The application must:

-> Extract and handle the exceptions thrown by doWork()

-> Continue normal program execution if other exceptions occur

You need to implement the requirements. Which code segment should you use?

Dumps4Cert 2018 PDF and VCE

  1. Option A

  2. Option B

  3. Option C

  4. Option D

Answer: C

Explanation: * The try statement lets you test a block of code for errors. The catch statement lets you handle the error.

The JavaScript statements try and catch come in pairs: try {

Block of code to try

}

catch(err) {

Block of code to handle errors

}

  • object.number [= errorNumber]

    Returns or sets the numeric value associated with a specific error. The Error object#39;s default property is number.

  • Example:

The following example causes an exception to be thrown and displays the error code that is derived from the error number.

try

{

// Cause an error. var x = y;

}

catch(e)

{

document.write (quot;Error Code: quot;); document.write (e.number amp; 0xFFFF) document.write (quot;lt;br /gt;quot;);

document.write (quot;Facility Code: quot;) document.write(e.numbergt;gt;16 amp; 0x1FFF) document.write (quot;lt;br /gt;quot;);

document.write (quot;Error Message: quot;) document.write (e.message)

}

The output of this code is as follows. Error Code: 5009

Facility Code: 10

Error Message: #39;y#39; is undefined

Reference: JavaScript Errors – Throw and Try to Catch; number Property (Error) (JavaScript)

Question No: 20 DRAG DROP – (Topic 1)

You are developing an online shopping application that accepts credit cards for payment.

If the credit card number is invalid, the application must: Generate an error

Assign quot;200quot; to the error number Assign quot;Invalidquot; to the error description

You need to write the code that meets the requirements.

How should you write the code? (To answer, drag the appropriate code segment or segments to the correct location in the answer area. Each code segment 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.)

Dumps4Cert 2018 PDF and VCE

Answer:

Dumps4Cert 2018 PDF and VCE

Dumps4Cert 2018 PDF and VCE

Explanation:

Example: throw new Error(200, quot;x equals zeroquot;);

100% Dumps4cert Free Download!
Download Free Demo:70-480 Demo PDF
100% Dumps4cert Pass Guaranteed!
Download 2018 Dumps4cert 70-480 Full Exam PDF and VCE

Dumps4cert ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
PDF VCE Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No

Leave a Reply

Your email address will not be published. Required fields are marked *