70-480 | Highest Quality 70-480 Exam Questions and Answers 2021
Exam Code: 70-480 (exam 70 480 pdf), Exam Name: Programming in HTML5 with JavaScript and CSS3, Certification Provider: Microsoft Certifitcation, Free Today! Guaranteed Training- Pass 70-480 Exam.
Online 70-480 free questions and answers of New Version:
NEW QUESTION 1
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.
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 02?
- A. canvas.style.transform = “rotation(90deg)”;
- B. canvas.transform(90);
- C. canvas.content.rotate(90);
- D. canvas.style.transform = “rotate(90deg)”;
Answer: D
Explanation: https://www.w3schools.com/jsref/prop_style_transform.asp
NEW QUESTION 2
You are modifying a blog site to improve search engine readability.
You need to group relevant page content together to maximize search engine readability. Which tag should you use?
- A. <span>
- B. <nav>
- C. <cable>
- D. <section>
Answer: D
Explanation: The <section> tag defines sections in a document. Such as chapters, headers, footers, or any other sections of the document.
NEW QUESTION 3
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
NEW QUESTION 4
HOTSPOT
You develop a webpage.
The layout of the webpage must resemble the following image:
You need to ensure that the page renders properly.
How should you complete the relevant CSS styles? (To answer, select the appropriate option from each drop-down list in the answer area.)
Answer:
Explanation: * position: relative
The element is positioned relative to its normal position, so "left:20" adds 20 pixels to the element's LEFT position
* position: absolute
The element is positioned relative to its first positioned (not static) ancestor element Reference: CSS position Property
NEW QUESTION 5
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 6
You are developing a customer web form that includes the following HTML.
<label id="txtValue"X/label>
Information from the web form is submitted to a web service. The web service returns the following JSON object.
{
"Confirmation": "1234", "FirstName": "John"
}
You need to display the Confirmation number from the JSON response in the txtValue label field.
Which JavaScript code segment should you use?
- A. $("#txtValue").val = (JSONObject.Confirmation);
- B. $("#txtValue").val (JSONObject.Confirmation);
- C. $("#txtValue").text = (JSONObject.Confirmation);
- D. $("#txtValue").text (JSONObject.Confirmation);
Answer: D
Explanation: Incorrect:
not A, not B: A label object has no value attribute. Reference:
http://api.jquery.com/text/
NEW QUESTION 7
You have the following markup.
You need to ensure that flex1 is displayed on the right of the page. flex2 must be displayed directly to the left of flex1.
Which style should you add to the outer div?
- A. flex-direction:column-reverse
- B. flex-direction:row-reserve
- C. flex-direction: row
- D. flex-direction: column
Answer: B
NEW QUESTION 8
DRAG DROP
You have the following HTML markup:
You need to create a JavaScript to add an additional option named Air to the shippingType element. You write the following code.
How should you complete the code? To answer, drag the appropriate lines of code to the correct targets in the answer are a. Each line may be used once, more than once, or not at all. You may drag the split bar between panes or scroll to view content.
Answer:
Explanation: Target 1:
Var newOption = document.createElement (“option”) ; Target 2:
Option.appendChild (newOption.text) ;
NEW QUESTION 9
HOTSPOT
You are developing an application in HTML5. You have the following HTML markup.
You have the following JavaScript code.
Use the drop-down lists to select the answer choice that completes each statement.
Answer:
Explanation:
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 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 12
DRAG DROP
You create the following JavaScript code:
You must complete the ShowCanWeAfford() function:
Display the message Denied! If the PaymentAmount variable is greater than 500. Display the message Approved! If the PaymentAmount variable is less than 300.
Display the message Approved with caution! If the PaymentAmount variable is less than 500 and greater than 300.
You need to add statements to the ShowCanWeAfford() JavaScript function to meet the requirements.
Which three actions should you perform in sequence? (Develop the solution by selecting the required code segments and arranging them in the correct order.)
Answer:
Explanation: Box 1:
Box 2:
Box 3:
Note:
Use > for greater than comparison. Use < for less than comparison.
NEW QUESTION 13
DRAG DROP
You create an HTML5 webpage. You have the following HTML markup:
You also have the following JavaScript code segment:
var jsonFruit = { "apples" : "12", "bananas" : "8", "watermelon" : "3" }
You need to add additional rows to the fruitTable element by processing the jsonFruit values in the order listed.
Which three actions should you perform in sequence? (Develop the solution by selecting the required code segments and arranging them in the correct order.)
Answer:
Explanation:
NEW QUESTION 14
You develop an HTML5 application. You give users a numeric access code that can be used only one
time.
Users must enter the numeric access code in the login form of the application. The numeric characters must be hidden by a masking character.
You need to implement the form element for users to enter the code. Which HTML element should you use?
- A. <input type="password" required autocomplete="off">
- B. <input type="input" autocomplete="off" required />
- C. <input type="password" stytem" visiblity:hidden;" required />
- D. <input type="button" value="password" required />
Answer: A
Explanation:
* Input Type: password
<input type="password"> defines a password field.
The characters in a password field are masked (shown as asterisks or circles).
* The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.
The autocomplete attribute works with the following <input> types: text, search, url, tel, email, password, datepickers, range, and color.
Reference: HTML Input Types ; HTML <input> autocomplete Attribute
NEW QUESTION 15
You have the following code:
You need to convert objStr into an array. Which line of code should you use?
- A. var jsObject = Array.bind(objStr);
- B. var jsObject = Array.valueOf(objStr);
- C. var jsObject = JSON.parse(objStr);
- D. var jsObject = $.makeArray(objStr);
Answer: C
Explanation: https://www.w3schools.com/js/js_json_parse.asp
NEW QUESTION 16
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 17
You are creating a web form that users will use to enter their personal information. The form includes the following HTML.
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
- A. Option A
- B. Option B
- C. Option C
- D. 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 <p> 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
NEW QUESTION 18
You are developing application web form by using HTML5 and JavaScript. You need to prevent users from submitting form data more than once. Which code segment should you use?
- A. Option A
- B. Option B
- C. Option C
- D. Option D
Answer: A
Explanation: * this, in disable(this), refers to the clicked button.
* The disabled attribute is a boolean attribute.
When present, it specifies that the <input> element should be disabled. A disabled input element is unusable and un-clickable.
The disabled attribute can be set to keep a user from using the <input> element until some other condition has been met (like selecting a checkbox, etc.). Then, a JavaScript could remove the disabled value, and make the <input> element usable.
Reference: HTML <input> disabled Attribute
NEW QUESTION 19
DRAG DROP
You create a webpage that includes the following HTML markup: (Line numbers are included for reference only.)
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.)
Answer:
Explanation:
NEW QUESTION 20
You are developing an application that consumes an external web service that returns the latest stock rate.
The application has two methods:
The getResults() method makes an AJAX web service request
The ShowRate() method displays the stock rate from the web service response
You need to ensure that the ShowRate() method always displays the latest stock rate. Which code segment should you use?
- A. Option A
- B. Option B
- C. Option C
- D. Option D
Answer: D
Explanation: " always displays the latest stock rate ". Should use cache: false Note: cache (default: true, false for dataType 'script' and 'jsonp') Type: Boolean
If set to false, it will force requested pages not to be cached by the browser. Reference: jQuery.ajax()
P.S. Surepassexam now are offering 100% pass ensure 70-480 dumps! All 70-480 exam questions have been updated with correct answers: https://www.surepassexam.com/70-480-exam-dumps.html (288 New Questions)