Microsoft 70-480 Online Practice
Questions and Exam Preparation
70-480 Exam Details
Exam Code
:70-480
Exam Name
:Programming in HTML5 with JavaScript and CSS3
Certification
:Microsoft Certifications
Vendor
:Microsoft
Total Questions
:332 Q&As
Last Updated
:Dec 07, 2021
Microsoft 70-480 Online Questions &
Answers
Question 121:
You develop an HTML application that is located at www.adventure-works.com.
The application must load JSON data from www.fabrikam.com.
You need to choose an approach for loading the data.
What should you do?
A. Design a REST URI scheme with multiple domains. B. Configure Cross-Origin Resource Sharing (CORS) on the servers. C. Load the data by using WebSockets. D. Use the jQuery getJSON method.
B. Configure Cross-Origin Resource Sharing (CORS) on the servers.
*
Cross-origin resource sharing (CORS) is a mechanism that allows Javascript on a web page to make XMLHttpRequests to another domain, not the domain the Javascript originated from. Such "cross-domain" requests would otherwise be forbidden by web browsers, per the same origin security policy. CORS defines a way in which the browser and the server can interact to determine whether or not to allow the cross-origin request. It is more powerful than only allowing same-origin requests, but it is more secure than simply allowing all such cross-origin requests.
*
You must use Cross Origin Resource Sharing
It's not as complicated as it sounds...simply set your request headers appropriately...in Python it would look like:
self.response.headers.add_header('Access-Control-Allow-Origin', '*'); self.response.headers.add_header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS'); self.response.headers.add_header('Access-Control-Allow-Headers', 'X-Requested-With'); self.response.headers.add_header('Access-Control-Max-Age', '86400');
Question 122:
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:
When a user selects the input control, the text must disappear.
You need to create the input control.
Which input control should you use?
D
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.
You write the following JavaScript code. (Line numbers are included for reference only.)
You need to write a function that will initialize and encapsulate the member variable fullname.
Which are two possible code fragments that you can insert at line 02 to achieve the goal? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
A. function Student(someName) { fullname=someName; } B. function Student (someName) { var fullname=someName; } C. function Student (fullname) { This.fullname=fullname; } D. function Student (someName) { this.fullname=someName; }
B. function Student (someName) { var fullname=someName; } C. function Student (fullname) { This.fullname=fullname; }
You are developing an HTML5 web application for a surveyor company that displays topographic images.
The application must: Display the topographic images at different zoom levels without loss of detail Print the topographic images without loss of detail Work from only one source file for each topographic image
You need to ensure that the topographic images display according to the requirements.
Which HTML5 element should you use?
A. SVG B. CANVAS C. SAMP D. AREA
A. SVG
SVG stands for Scalable Vector Graphics SVG is used to define graphics for the Web SVG is a W3C recommendation
The HTML
SVG has several methods for drawing paths, boxes, circles, text, and graphic images.
You are developing a web application that retrieves data from a web service. The data being retrieved is a custom binary datatype named bint. The data can also be represented in XML.
Two existing methods named parseXml() and parseBint() are defined on the page.
The application must:
Retrieve and parse data from the web service using binary format if possible Retrieve and parse the data from the web service using XML when binary format is not possible You need to develop the application to meet the requirements. What should you do? (To answer, select the appropriate options from the drop-down lists in the answer area.)
Hot Area:
* accepts : 'application/bint, text/xml'
accepts:'application/bin,text/xml' to accept only XML and binary content in HTML responses.
* Use the following condition to check if the html response content is binary: If(request.getResponseHeader("Content-Type")=="application/bint"