Microsoft 70-480 Exam Questions and Answers 2021

It is impossible to pass Microsoft 70-480 exam without any help in the short term. Come to us soon and find the most advanced, correct and guaranteed 70 480 certification. You will get a surprising result by our 70 480 pdf.

Microsoft 70-480 Free Dumps Questions Online, Read and Test Now.

NEW QUESTION 1
You are developing a website that helps users locate theaters in their area from a browser. You created a function named findTheaters ().
The function must:
Get the current latitude and longitude of the user's device Pass the user's location to findTheaters()
The user needs to access the geolocation information from the browser before searching for theaters.
Which code segment should you use?
70-480 dumps exhibit

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D

Answer: C

Explanation: * The getCurrentPosition method retrieves the current geographic location of the device. The location is expressed as a set of geographic coordinates together with information about heading and speed. The location information is returned in a Position object.
syntax of this method:
getCurrentPosition(showLocation, ErrorHandler, options); where
showLocation : This specifies the callback method that retrieves the location information. This method is called asynchronously with an object corresponding to the Position object which stores the returned location information.
ErrorHandler : This optional parameter specifies the callback method that is invoked when an error occurs in processing the asynchronous call. This method is called with the PositionError object that stores the returned error information.
* e example below is a simple Geolocation example returning the latitude and longitude of the user's position:
Example
<script>
var x = document.getElementById("demo"); function getLocation() {
if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
x.innerHTML = "Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude;
}
</script>
Example explained:
Check if Geolocation is supported
If supported, run the getCurrentPosition() method. If not, display a message to the user
If the getCurrentPosition() method is successful, it returns a coordinates object to the function specified in the parameter ( showPosition )
The showPosition() function gets the displays the Latitude and Longitude
The example above is a very basic Geolocation script, with no error handling. Reference: HTML5 Geolocation; Geolocation getCurrentPosition() API

NEW QUESTION 2
You are developing an HTML5 web application that provides a discussion forum for users. When a user registers to access the application, the user enters an email address.
Users can enter data that can result in cross-site scripting (XSS) attacks. You need to ensure that email input is as secure as possible.
Which two techniques should you use? (Each correct answer presents a complete solution. Choose two.)

  • A. Remove all nonalphanumeric characters before submitting data.
  • B. Use the email tag in forms where the email address is entered.
  • C. Display all email addresses inside of an HTML5 ADDRESS element.
  • D. Use jQuery validation with a regular expression to ensure that email addresses are valid.
  • E. Ensure that all form data is encrypted when it is submitted.

Answer: BD

Explanation: B: The <input type="email"> 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 ".com" to the keyboard to match email input. D: JQuery can be used to validate email addresses.
Reference: HTML Input Types; Email Validation Using jQuery Codes

NEW QUESTION 3
Which CSS3 code fragment styles an H2 element only if it is a direct child of a DIV element?

  • A. h2 > div {background-color: #900;}
  • B. div, h2 {background-color: #900;}
  • C. div {background-color: #900;}h2 {background-color: #900;}
  • D. div > h2 {background-color: #900;}

Answer: D

Explanation: https://www.w3.org/TR/CSS21/selector.html%23id-selectors

NEW QUESTION 4
You are creating a JavaScript object that represents a customer.
You need to extend the Customer object by adding the GetCommission() method.
You need to ensure that all future instances of the Customer object implement the GetCommission() method.
Which code segment should you use?
70-480 dumps exhibit

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D

Answer: D

Explanation: * Object.prototype.constructor
Returns a reference to the Object function that created the instance's prototype. Note that the value of this property is a reference to the function itself, not a string containing the function's name. The value is only read-only for primitive values such as 1, true and "test".
* The constructor property is created together with the function as a single property of func.prototype.
Reference: Object.prototype.constructor

NEW QUESTION 5
You are developing a web page that will be divided into three vertical sections. The main content of the site will be placed in the center section. The two outer sections will contain advertisements.
You have the following requirements:
The main content section must be set to two times the width of the advertising sections. The layout must be specified by using the CSS3 flexible box model.
You need to ensure that the visual layout of the page meets the requirements. Which CSS3 property should you use?

  • A. box-orient
  • B. box-flex-group
  • C. box-flex
  • D. box-direction

Answer: C

Explanation: box-flex
Values: 0 | Any integer
The flexibility ratio for this child. If a child had 1 and its sibling had 2, any additional space in the parent box would be consumed twice as much by the sibling. It defaults to 0 which is inflexible. Reference: Quick hits with the Flexible Box Model http://www.html5rocks.com/en/tutorials/flexbox/quick/

NEW QUESTION 6
HOTSPOT
You need to create a page that displays the content as shown in the exhibit. (Click the Exhibit button.)
70-480 dumps exhibit
You write the following markup.
70-480 dumps exhibit
How should you complete the markup? To answer, select the appropriate code element for each target in the answer area.
70-480 dumps exhibit

    Answer:

    Explanation: 70-480 dumps exhibit

    NEW QUESTION 7
    DRAG DROP
    You need to write a callback function in JavaScript. You write the following code:
    70-480 dumps exhibit
    How should you complete the code? To answer, drag the appropriate code elements to the correct targets in the answer are a. Each code element 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.
    70-480 dumps exhibit

      Answer:

      Explanation: Target 1: callback
      Target 2: callback()
      Target 3: function()
      References: https://www.impressivewebs.com/callback-functions-javascript/

      NEW QUESTION 8
      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.)
      70-480 dumps exhibit
      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?

      • A. if (!(counter % 25))
      • B. if (counter == 25)
      • C. if (counter >> 25 == 0)
      • D. if (counter << 25 == 0)

      Answer: A

      Explanation: %
      (Modulus) Computes the integer remainder of dividing 2 numbers. Incorrect:
      >> (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.
      << (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

      NEW QUESTION 9
      HOTSPOT
      You develop an HTML5 application that allows images to be dragged and dropped within a webpage. The webpage contains a DIV element and four IMG elements as defined in the code segment below:
      70-480 dumps exhibit
      You need to enable drag and drop for the application.
      How should you complete the relevant code? (To answer, select the appropriate option from each drop-down list in the answer area.)
      70-480 dumps exhibit
      70-480 dumps exhibit

        Answer:

        Explanation: * setData method (dataTransfer)
        Specifies the data and its format for the current drag-and-drop operation.
        * getData method (dataTransfer)
        Retrieves the specified formatted data from the current drag-and-drop operation.

        NEW QUESTION 10
        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. Add a crossdomain.xml file to the second server.
        • B. Configure Cross-Origin Resource Sharing (CORS) on the servers.
        • C. Load the data in a JavaScript timeout callback.
        • D. Reference the remote data as an XML resource.

        Answer: B

        Explanation: * 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.[2] 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');

        NEW QUESTION 11
        You develop a webpage by using HTML5. You create the following markup:
        <input type "url" name= "website" required="required" />
        You need to ensure that the value that the user enters contains a secure URL. What should you do?

        • A. Add the following attribute to the input tag: value="https://v
        • B. Add the following attribute to the input tag: pattern="https://.+"
        • C. Add the following attribute to the input tag: value="ssl"
        • D. Add the following attribute to the input tag: itemtype="https"

        Answer: B

        Explanation: Note:
        * The pattern attribute is supported in Internet Explorer 10, Firefox, Opera, and Chrome.
        * The pattern attribute specifies a regular expression that the <input> element's value is checked against.
        * The pattern attribute works with the following input types: text, search, url, tel, email, and password

        NEW QUESTION 12
        You are modifying a website. The body of the page will be divided into two sections: A content section will contain blog posts and comments.
        An area on the right-hand side will contain advertisements. The page is defined by the following HTML.
        70-480 dumps exhibit
        The site must conform to HTML5 standards and must use HTML5 semantic tags.
        You need to ensure that the advertisements are on the rightmost section of the page. Which tag should you use?

        • A. <aside>
        • B. <div>
        • C. <article>
        • D. <footer>

        Answer: A

        Explanation: The <aside> tag defines some content aside from the content it is placed in. The aside content should be related to the surrounding content.
        aside is now acceptable for secondary content when not nested within an article element. Reference: HTML <aside> Tag

        NEW QUESTION 13
        You develop an HTML5 webpage. You have the following HTML markup:
        70-480 dumps exhibit
        You also have the following JavaScript code:
        70-480 dumps exhibit
        You need to post messages by using the HTML5 WebSocket API. Which code segment should you use?

        • A. socket.onmessage($(“#message”).val());
        • B. socket.send($(“#message”).val());
        • C. var msg = $(“#message”).val();$.post(socket, function (msg) { … });
        • D. var msg = $(“#message”).val();$.post(socket.onmessage, function (msg) { … });

        Answer: B

        Explanation: References: https://www.tutorialspoint.com/html5/html5_websocket.htm

        NEW QUESTION 14
        DRAG DROP
        You have the following markup.
        70-480 dumps exhibit
        You need to ensure that when the button is clicked, a message appears that displays the value of the button.
        How should you complete the code? To answer, drag the appropriate code elements to the correct targets in the answer area. Each code element 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.
        70-480 dumps exhibit

          Answer:

          Explanation: 70-480 dumps exhibit

          NEW QUESTION 15
          You have the following code. (Line numbers are included for reference only.)
          70-480 dumps exhibit
          You execute the code and you receive an alert that displays the following message: “Undefined”. You need to ensure that the alert displays as shown:
          70-480 dumps exhibit
          What should you do?

          • A. Replace line 13 with the following code:alert(e.message);
          • B. Replace line 06 with the following code:throw new eval(“Oh no! ‘n’ is too small!”)
          • C. Replace line 13 with the following code:alert(e);
          • D. Replace line 06 with the following code.throw new Error(“Oh no! ‘n’ is too small!”)

          Answer: D

          Explanation: http://www.javascriptkit.com/javatutors/trycatch2.shtml

          NEW QUESTION 16
          DRAG DROP
          You have a function named getContent that returns a string. Sometimes, the function throws an exception.
          You need to develop a method named writeContent. writeContent must generate an HTML page that contains the following:
          the text “Welcome”
          the content returned by thegetContentmethod or the exception message of an exception thrown by thegetContentmethod
          the text “Bye”
          In which order should you arrange the code blocks to develop the solution? To answer, move all code blocks from the list of code blocks to the answer area and arrange them in the correct order.
          70-480 dumps exhibit

            Answer:

            Explanation: 70-480 dumps exhibit

            P.S. 2passeasy now are offering 100% pass ensure 70-480 dumps! All 70-480 exam questions have been updated with correct answers: https://www.2passeasy.com/dumps/70-480/ (288 New Questions)