PrepAway - Latest Free Exam Questions & Answers

Which code segment should you insert at line 04?

You develop an HTML5 application. The application uses an image that is returned from an HTTP
POST request.
You develop the following code: (Line numbers are included for reference only.)

You need to display the loaded image in the application.
Which code segment should you insert at line 04?

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

4 Comments on “Which code segment should you insert at line 04?

  1. afkar says:

    function loadDoc() {
    var xhttp = new XMLHttpRequest();
    xhttp.open(“GET”, “/p1.png”, true);
    var img = document.createElement(‘img’);
    xhttp.responseType = ‘blob’;
    xhttp.onload = function (e) {
    if (xhttp.readyState == 4 && xhttp.status == 200) {
    img.src = window.URL.createObjectURL(this.response);
    document.body.appendChild(img);
    }
    };
    xhttp.send();
    }




    0



    0

Leave a Reply