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

197
Views
Delete <script> after function call

I have a php website that is generating heck ton of <script> somefunction(...) </script> The issue is that I don't really enjoy website with all those elements. Is there a way to delete element after the function is called?

What I mean is that I would like it to do something like this:

<script>
   somefunction();
   delete_script_element();
</script>

and that delete_script_element() is able to get the element it called in, and then removes it, I guess simply by:

function delete_script_element() {
   document."GetParentElement".remove();
}

I potentially can also put the code in each , but I still don't know how to target the parent element.

Any help appreciated ^^

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