Questão
ID 1395256Disciplina: Tecnologia da Informação
Assunto: AJAX
Ano: 2016 Banca: COVEST Comissão de Processos Seletivos e Treinamentos Órgão: Universidade Federal de Pernambuco
Considere o código em Javascript inserido no seguinte HTML:
1<html>
2<body>
3<form>
4<input type= ''text'' id= ''url''>
5<input type=''button'' id=''botão'' value=''carregar''>
6<div id=''contents'' ></div>
7</form>
8<script>
9 function loadURL() {
10 var xhttp = new XMLHttpRequest () ;
11 xhttp.onreadytatechange = function () {
12 if (this.readyState == 4 && this.status == 200) {
13 document.getElementByld (''contents'').innerHTML = this. responseText;
14 } else {
15 document.getElementByld (''contents''). innerHTML = ''hão foi possí vel carregar''
16 }
17 };
18 xhttp.open(''GET'', document.getElementByld(''url'').value, true);
19 xhttp. send ();
20 }
21 documnet.getElmentByld (''botao'').click = loadURL;
22 </script>
23 </body>
24 </html>
Uma das linhas do referido código está incorreta. Assinale a alternativa que apresenta essa linha: