Questão 56 · TRT-24 2017 · Técnico · Tecnologia da Informação

Consider the following AJAX code:
<pre>function loadReport() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("data").innerHTML = this.responseText; } }; xhttp.open("GET", "report.txt", true); xhttp.send(); }</pre>The <code>readyState</code> property holds the status of the <code>XMLHttpRequest</code>. So, <code>this.readyState == 4</code> means that
  1. A)server connection was established.
  2. B)request was received.
  3. C)request has finished and response is ready.
  4. D)request is being processed.
  5. E)request wasn't initialized yet.
Responder e ver o gabarito comentado →

Grátis, sem cartão. No Chip você responde, vê o gabarito e o comentário com a pegadinha, o macete e o fundamento na lei.