Microsoft 70-480 Study Guides 2021
Want to know 70 480 practice test features? Want to lear more about 70 480 exam experience? Study 70 480 exam dumps. Gat a success with an absolute guarantee to pass Microsoft 70-480 (Programming in HTML5 with JavaScript and CSS3) test on your first attempt.
Free demo questions for Microsoft 70-480 Exam Dumps Below:
NEW QUESTION 1
Which CSS3 code fragment uses a pseudo-element?
- A. p: : first-letter {font-weight: bold;}
- B. div>p {font-weight: bold;}
- C. first-letter {font-weight: bold;}
- D. div+p {font-weight: bold;}
Answer: A
Explanation: References:
http://www.html5code.nl/css3-tutorials/css3-tutorial-css3-selectors/
NEW QUESTION 2
You are developing a web page that has a group of H1 and H2 elements. The page also includes a CSS class named underlineMe.
You have the following requirements:
The font color of all H1 and H2 elements must be changed to red.
The CSS class underlineMe must be applied to all H1 and H2 elements. You need to update the web page to meet the requirements.
Which code segment should you use?
- A. Option A
- B. Option B
- C. Option C
- D. Option D
Answer: D
Explanation: The :header selector selects all header elements (<h1> to <h6>). Reference: jQuery :header Selector http://www.w3schools.com/jquery/sel_header.asp
NEW QUESTION 3
You are creating a class named Sedan that must inherit from the Car class. The Sedan class must
modify the inherited fourDoor () method. The Car class is defined as follows.
Future instances of Sedan must be created with the overridden method. You need to write the code to implement the Sedan class.
Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.)
- A. Option A
- B. Option B
- C. Option C
- D. Option D
Answer: BC
Explanation: * The Object.prototype property represents the Object prototype object.
* Object.prototype.constructor
Specifies the function that creates an object's prototype.
* Example:
Employee.prototype = new Person(); var Customer = function(name) { this.name = name;
};
Customer.prototype = new Person(); var Mime = function(name) { this.name = name;
this.canTalk = false;
};
Mime.prototype = new Person(); Reference: Object.prototype
NEW QUESTION 4
HOTSPOT
You test a webpage that contains the following JavaScript code:
The webpage also contains the following markup:
You need to ascertain how the webpage responds when the user enters characters and then clicks the add and divide buttons.
For each statement in the table, select Yes if the action causes the webpage to behave as described. Select No if it does not. Make only one selection in each column.
Answer:
Explanation: 
NEW QUESTION 5
DRAG DROP
You have the following markup.
You need to ensure that the form can be submitted only if fname contains dat a.
You write the following code.
How should you complete the code? To answer, drag the appropriate code elements to the correct
targets. Each code element maybe used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Answer:
Explanation: Target 1: “myForm”
Target 2: “fname”
Target 3: ==
Target 4: ||
Target 5: == References:
NEW QUESTION 6
You are developing an HTML5 page. The page includes the following code.
The inner paragraph must be exactly 15 pixels from the top left corner of the outer paragraph. You set the left style for the inner paragraph to the appropriate value.
You need to set the position property of the inner paragraph. Which value should you use?
- A. absolute
- B. static
- C. fixed
- D. relative
Answer: A
Explanation: absolute: The element is positioned relative to its first positioned (not static) ancestor element. Incorrect:
Not D:
relative: The element is positioned relative to its normal position, so "left:20" adds 20 pixels to the element's LEFT position.
Reference: CSS position Property http://www.w3schools.com/cssref/pr_class_position.asp
NEW QUESTION 7
DRAG DROP
You are developing a form that captures a user's email address by using HTML5 and jQuery. The form must capture the form elements as a string.
You need to implement this functionality.
How should you develop the form? (To answer, drag the appropriate code segment to the correct target or targets in the answer are
Answer:
Explanation: * The serialize() method creates a URL encoded text string by serializing form values.
You can select one or more form elements (like input and/or text area), or the form element itself. The serialized values can be used in the URL query string when making an AJAX request.
Example: $("form").serialize());
* decodeURIComponent
The decodeURIComponent() function decodes a URI component.
Return Value: A String, representing the decoded URI Incorrect:
Not decodeURI:
decodeURI is intended for use on the full URI.
decodeURIComponent is intended to be used on .. well .. URI components that is any part that lies between separators (; / ? : @ & = + $ , #).
Reference: jQuery serialize() Method
NEW QUESTION 8
You are developing a web page that performs CPU-intensive calculations. A web worker processes these calculations on a separate background thread. The process is instantiated from the web page. You need to stop the web worker process after the calculations are completed.
Which two actions can you perform to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
- A. From the web page, call the close() method.
- B. From the web worker process, call the terminate() method.
- C. From the web page, call the terminate() method.
- D. From the web worker process, call the close() method.
Answer: CD
Explanation: Terminating a worker
If you need to immediately terminate a running worker, you can do so by calling the worker's terminate() method:
myWorker.terminate();
The worker thread is killed immediately without an opportunity to complete its operations or clean up after itself.
Workers may close themselves by calling their own close method: close();
Reference: Using Web Workers
NEW QUESTION 9
HOTSPOT
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 "200" to the error number Assign "Invalid" to the error description
You need to write the code that meets the requirements.
How should you write the code? (To answer, select the appropriate option from the drop-down list in the answer area.)
Answer:
Explanation: Example: throw new Error(200, "x equals zero"); Reference: throw Statement (JavaScript)
NEW QUESTION 10
You are developing an application that analyzes population data for major cities in the United States. The application retrieves population statistics for a city by using a web service.
You need to request data from the web service by using jQuery. Which code segment should you use?
- A. Option A
- B. Option B
- C. Option C
- D. Option D
Answer: D
Explanation: * type:
We post a SOAP request.
* data:
Data to be sent to the server.
The data option can contain either a query string of the form key1=value1&key2=value2, or an object of the form {key1: 'value1', key2: 'value2'}.
Reference: jQuery.ajax()
NEW QUESTION 11
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?
- A. Option A
- B. Option B
- C. Option C
- D. 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
NEW QUESTION 12
You need to write a self-executing anonymous function in JavaScript. Which code snippet should you include in the function?
- A. (function () {...});
- B. (function anon() {...}) ();
- C. (function anon() {...};
- D. (function () {...}) ();
Answer: D
Explanation: References:
http://esbueno.noahstokes.com/post/77292606977/self-executing-anonymous-functions-or-how-to- write
NEW QUESTION 13
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.)
- A. From the web worker, use the onconnect event handler of the main page to capture events.
- B. From the main page, use the onmessage event handler of the web worker to capture events.
- C. From the web worker, use the onmessage event handler of the main page to capture events.
- D. From the main page, use the onconnect event handler of the web worker to capture events.
Answer: BC
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("demo_sse.php"); source.onmessage = function(event) {
document.getElementById("result").innerHTML += event.data + "<br>";
};
Reference: http://www.w3schools.com/html/html5_serversentevents.asp http://www.html5rocks.com/en/tutorials/workers/basics/
NEW QUESTION 14
NOTE: This question is a part of series of questions that presents the same scenario. Each question in the series contains unique solution that might meet the started goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. you will not be able to return to it. As a result, these questions will not appear in the review screen.
You have the following HTML5 and CSS3 markup within a webpage.
You need to set the background color of the Home link to yellow. The solution can affect the color of the other elements.
Solution: You use the following style:
Does this meet the goal?
- A. Yes
- B. No
Answer: B
NEW QUESTION 15
An HTML page contains no embedded JavaScript or CSS code. The body of the page contains only the following line of code.
<p id="test">test</p>
A CSS style sheet must be applied dynamically. The style must visibly change the appearance of the paragraph on the page.
You need to apply a style to the paragraph. Which line of code should you use?
- A. document.getElementById("test").style.top = "5px";
- B. document.getElementById("test").style.border = "0";
- C. document.getElementById("test").style.color = "red";
- D. document.getElementById ("test").style.position = "absolute";
Answer: C
NEW QUESTION 16
You are developing an e-commerce website. Users place products into a shopping cart. You need to ensure that the shopping cart data is available between browser sessions. Which object should you use to store the shopping cart data?
- A. clientStorage
- B. localStorage
- C. applicationStorage
- D. sessionStorage
Answer: B
Explanation: With local storage, web applications can store data locally within the user's browser. HTML local storage, better than cookies.
Before HTML5, application data had to be stored in cookies, included in every server request. Local storage is more secure, and large amounts of data can be stored locally, without affecting website performance.
Reference: HTML5 Local Storage
P.S. Easily pass 70-480 Exam with 288 Q&As 2passeasy Dumps & pdf Version, Welcome to Download the Newest 2passeasy 70-480 Dumps: https://www.2passeasy.com/dumps/70-480/ (288 New Questions)