Pular para o conteúdo principal

Questão de Programação — Linguagens de marcação — UFPE 2022

ProgramaçãoLinguagens de marcação
Código
qq807478
Banca
UFPE
Órgão
UFPE
Ano
2022
Nível
Médio
Cargo
Técnico de Tecnologia da Informação - Suporte e Redes
Qual código HTML com jQuery abaixo irá apresentar corretamente um botão que, quando clicado, emitirá um alerta no navegador Web?
  1. A<!doctype html><html><head><meta charset="utf-8"><title>Prova UFPE</title></head><body><button id="botaoAlerta" name="Alerta">Exemplo</button><script src="jquery-3.6.0.js"></script><script>$("#botaoAlerta").click(function(){alert('Concurso UFPE!');})</script></body></html>
  2. B<!doctype html><html><head><meta charset="utf-8"><title>Prova UFPE</title></head><body><button id="botaoAlerta" name="Alerta">Exemplo</button><script src="jquery-3.6.0.js"></script><script>$("botaoAlerta").click(function(){alert('Concurso UFPE!');})</script></body></html>
  3. C<!doctype html><html><head><meta charset="utf-8"><title>Prova UFPE</title></head><body><button id="botaoAlerta" name="Alerta">Exemplo</button><script src="jquery-3.6.0.js"></script><script>("#Alerta").click(function(){alert('Concurso UFPE!');})</script></body></html>
  4. D<!doctype html><html><head><meta charset="utf-8"><title>Prova UFPE</title></head><body><button id="botaoAlerta" name="Alerta">Exemplo</button><script src="jquery-3.6.0.js"></script><script>$("Alerta").click(function(){alert('Concurso UFPE!');})</script></body></html>
  5. E<!doctype html><html><head><meta charset="utf-8"><title>Prova UFPE</title></head><body><button id="botaoAlerta" name="Alerta">Exemplo</button><script src="jquery-3.6.0.js"></script><script>("botaoAlerta").click(function(){alert('Concurso UFPE!');})</script></body></html>
Revelar gabarito e comentário

GabaritoB — <!doctype html> <html> <head> <meta charset="utf-8"> <title>Prova UFPE</title> </head> <body> <button id="botaoAlerta" name="Alerta">Exemplo</button> <script src="jquery-3.6.0.js"></script> <script> $("botaoAlerta").click(function(){ alert('Concurso UFPE!'); }) </script> </body> </html>

Link permanente: /questoes/qq807478