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

Programming in HTML5 with JavaScript and CSS3

Question No: 171 – (Topic 4)

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

Dumps4Cert 2018 PDF and VCE

The application must:

-> Display the number of orders processed and the number of orders remaining

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

  1. if (!(counter % 25))

  2. if (counter == 25)

  3. if (counter gt;gt; 25 == 0)

  4. if (counter lt;lt; 25 == 0)

Answer: A Explanation: %

(Modulus) Computes the integer remainder of dividing 2 numbers.

Incorrect:

gt;gt; (Sign-propagating right shift) Shifts the first operand in binary representation the number of bits to the right specified in the second operand, discarding bits shifted off.

lt;lt; (Left shift) Shifts its first operand in binary representation the number of bits to the left specified in the second operand, shifting in zeros from the right.

Reference: JavaScript Operators

Question No: 172 – (Topic 4)

You are developing an HTML5 page named main.html. The JavaScript code for the main page is located in a file named myApp.js.

You need to create a web worker and instantiate it from main.html. Where should you place the web worker code?

  1. In the myApp.js file

  2. In the main.html file

  3. In a separate .js (JavaScript) file

  4. In a separate executable file

Answer: C

Explanation: Spawning a dedicated worker

Creating a new worker is simple. All you need to do is call the Worker() constructor, specifying the URI of a script to execute in the worker thread (main.js):

var myWorker = new Worker(quot;worker.jsquot;); Reference: Using Web Workers

Question No: 173 – (Topic 4)

You develop a webpage with a standard input control by using HTML5.

The input control must display the text Enter your given name, as shown below:

Dumps4Cert 2018 PDF and VCE

When a user selects the input control, the text must disappear. You need to create the input control.

Which input control should you use?

  1. lt;input name=quot;GivenNamequot; value=quot; Enter your given namequot; /gt;

  2. lt;input name =quot;GivenNamequot; default=quot; Enter your given namequot; /gt;

  3. lt;input name=quot;GivenNamequot; text=quot; Enter your given namequot; /gt;

  4. lt;input name=quot;GivenNamequot; placeholder=quot; Enter your given namequot; /gt;

Answer: D

Explanation: The placeholder attribute specifies a short hint that describes the expected value of an input field (e.g. a sample value or a short description of the expected format).

The short hint is displayed in the input field before the user enters a value.

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

Reference: HTML lt;inputgt; placeholder Attribute

Question No: 174 – (Topic 4)

You develop an HTML5 webpage that contains the following HTML markup:

Dumps4Cert 2018 PDF and VCE

Users must receive a message after they click the Submit button if the text entered into the favoriteColor text box is fewer than 2 characters or greater than 10 characters.

You need to implement the testLength() 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: D

Explanation: Use three arguments: element, min, max. Compare element.value with min and max.

Question No: 175 HOTSPOT – (Topic 4)

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:

Dumps4Cert 2018 PDF and VCE

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

Dumps4Cert 2018 PDF and VCE

Dumps4Cert 2018 PDF and VCE

Answer:

Dumps4Cert 2018 PDF and VCE

Explanation:

Dumps4Cert 2018 PDF and VCE

  • border: 1px solid #f00; a red border 1 pixel thick.

  • background-image: linear-gradient(to bottom, green,black); Linear Gradients (goes down/up/left/right/diagonally).

    Starts at the top with green and goes to bottom with black.

  • margin: 10px 10px 10px 10px;

The CSS margin properties define the space around elements.

The top, right, bottom, and left margin can be changed independently using separate properties.

Incorrect:

  • border-color: red;

    will not display any border

  • Radial Gradients (defined by their center).

Question No: 176 – (Topic 4)

You are developing a customer contact form that will be displayed on a page of a company#39;s website. The page collects information about the customer.

If a customer enters a value before submitting the form, it must be a valid email address. You need to ensure that the data validation requirement is met.

What should you use?

  1. lt;input name=quot;emailquot; type=quot;inputquot; required=quot;requiredquot;/gt;

  2. lt;input name=emailquot; type=quot;urlquot; required=quot;emailquot;/gt;

  3. lt;input name=quot;emailquot; classquot; emailquot;/gt;

  4. lt;input name=quot;emailquot; type=quot;emailquot;/gt;

Answer: D

Explanation: The lt;input type=quot;emailquot;gt; is used for input fields that should contain an e- mail address.

Depending on browser support, the e-mail address can be automatically validated when submitted.

Some smartphones recognize the email type, and adds quot;.comquot; to the keyboard to match email input.

Reference: HTML Input Types

Question No: 177 DRAG DROP – (Topic 4)

You are developing a corporate website for a company. The website uses a style sheet to enforce corporate image standards. Users report that the website is not properly rendering the styles.

You create a web page to test the styles by using the following code.

Dumps4Cert 2018 PDF and VCE

You need to verify how the style will be displayed.

In which order will the results be displayed? (To answer, drag the appropriate style from the list of styles to the correct location or locations in the work area.)

Dumps4Cert 2018 PDF and VCE

Answer:

Dumps4Cert 2018 PDF and VCE

Question No: 178 – (Topic 4)

You are developing a web application by using HTML5.

You have the following requirements.

-> The color of a menu item must change when a user hovers over the item.

-> The color of the menu item must change back to its original color after five seconds.

You need to ensure that the animation is applied to all menu items. Which CSS3 code should you use?

Dumps4Cert 2018 PDF and VCE

  1. Option A

  2. Option B

  3. Option C

  4. Option D

Answer: C

Explanation: transition-property

The transition-property property specifies the name of the CSS property the transition effect is for (the transition effect will start when the specified CSS property changes).

Tip: A transition effect could typically occur when a user hover over an element.

Note: Always specify the transition-duration property, otherwise the duration is 0, and the transition will have no effect.

CSS3 transition-property Property

Question No: 179 – (Topic 4)

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?

  1. parentObj.instanceof(testObj)

  2. testObj.isPrototypeOf(parentObj)

  3. testObj.instanceof(parentObj)

  4. parentObj.isPrototypeOf(testObj)

Answer: B

Explanation: The isPrototypeOf() method tests for an object in another object#39;s prototype chain.

Reference: Object.prototype.isPrototypeOf()

Question No: 180 DRAG DROP – (Topic 4)

You have the following markup:

Dumps4Cert 2018 PDF and VCE

You need to add a dashed border programmatically to the div. You write the following code.

Dumps4Cert 2018 PDF and VCE

How should you complete the code? To answer, drag the appropriate code elements to the correct targets in the answer area. Each code can 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

Explanation:

getElementById 鈥測ellowDiv鈥?鈥測ellow鈥?/p>

https://www.w3schools.com/jsref/prop_style_border.asp

100% Dumps4cert Free Download!
70-480 PDF
100% Dumps4cert Pass Guaranteed!
70-480 Dumps

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