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

74
Visualizações
Manipulate HTMLCollection with Javacsript

JS noob question:

I'm trying to manipulate the HTMLCollection of a Wordpress plugin and I failed for some hours now. I want to delete the property "baseURI" or set it to null.

jQuery(document).ready(function( $ ){
    //HTML Collection
    var test = document.getElementsByClassName("post-2968"); 
    
    //manipulate <a> object inside <div>
    test[0].childNodes[0].target="_blank";
    test[0].childNodes[0].href="www.google.com";
    
    //manipulte property of div
    test[0].baseURI = undefined; // also tried "" or null
    
      console.log(test)

});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

This is the log: Console.logg

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

0

As is written in the documentation:

The baseURI --->read-only<---- property returns the absolute base URL of a Node.

So I don't think you can change it.

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