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

131
Visualizações
How to fix the javascript execution error in blogger
<script>
var coll = document.getElementsByClassName("collapsible");
var i;

for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
  this.classList.toggle("active");
  var content = this.nextElementSibling;
  if (content.style.maxHeight){
    content.style.maxHeight = null;
  } else {
    content.style.maxHeight = content.scrollHeight + "px";
  } 
});
}
</script>

When I am using this code in blogger this shows:-

"org.xml.sax.SAXParseException; lineNumber: 301; columnNumber: 16; The content of elements must consist of well-formed character data or markup. " Here is the image

Please help me how to fix this problem

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Even just looking at the syntax coloring that you provided in your image, the < is giving you problems in this line, line 301:

for (i = 0; i < coll.length; i++) {

The parser is interpreting < as the start of a tag, and expects a tag name and an end tag >. However, I'm guessing you are trying to use it as the JavaScript "less than" operator.

In that case, escape < as &lt;.

In otherwords, replace that line with:

for (i = 0; i &lt; coll.length; i++) {

about 4 years ago · Juan Pablo Isaza Relatório
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