Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

73
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda