Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

71
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!