How to remove a tag using javascript?

  • 0
    Good day. How can I remove a tag using javascript. I have a tag with class class = "havesubchild sub mpIt mpId2". And inside this tag there is another
    • tag that needs to be removed via javascript. Please tell me a ready command with document ..... so that I can figure it out. Here is a photo, I circled what needs to be removed. You need to somehow get access through this class to the ul tag and just delete it. Thank you in advance. I would be very grateful for your help))

    JavaScript Adelaide Price, Apr 27, 2019

  • 2 Answers
  • 0
    document.querySelector('.havesubchild.sub.mpIt.mpId2 > ul').remove();
    Anonymous

  • 0

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!