Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

116
Visualizações
How to detect if browser supports particular HTML escape characters?

I'm using JavaScript to add append "✓" after a button's action comes back verified from the server. For the most part, it works OK, and I'm satisfied with how it looks. I haven't found an ASCII character to adequately communicat the same message.

My problem is that some older browsers, notably Firefox 3.6 and Camino do not understand this escape sequence, and so the user also sees "✓" instead of the checkmark character.

Is there a way to detect if the browser does not supprot this escape sequence and replace it with something else, e.g. "OK"? In other words, what goes in the if statement below?

// ...
var elemOK = document.createElement('span');
if ( ... ) { /* <----- what goes inside the if statement? */
    elemOK.innerHTML = '&check;'; // checkmark
} else {
    elemOK.innerHTML = 'OK';
}
elemActionButton.appendChild(elemOK);
// ....
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda