removeChild
should be invoked on the parent, i.e.:
parent.removeChild(child);
In your example, you should be doing something like:
if (frameid) {
frameid.parentNode.removeChild(frameid);
}
More Related Contents:
- What is the difference between properties and attributes in HTML?
- “Submit is not a function” error in JavaScript
- What is the most efficient way to create HTML elements using jQuery?
- When should I use jQuery’s document.ready function?
- How can I count text lines inside an DOM element? Can I?
- How to serialize DOM node to JSON even if there are circular references?
- How do I replace text inside a div element?
- Dynamically creating HTML elements using Javascript?
- How to bind bootstrap popover on dynamic elements
- getElementsByName in IE7
- Chrome extension adding external javascript to current page’s html
- JavaScript: DOM load events, execution sequence, and $(document).ready()
- Difference between .tagName and .nodeName
- How to retrieve the element where a contextmenu has been executed
- Removing HTMLCollection elements from the DOM
- HTML Table with vertical rows
- How AJAX is done in github source browse?
- Is it the last `script` element the currently running script?
- Is there a difference between `new Image()` and `document.createElement(‘img’)`?
- How to generate unique css selector for DOM element?
- How to add DOM element script to head section?
- React, losing saved data in localStorage with useEffect after page refresh
- How to escape HTML
- Stopping a iframe from loading a page using javascript
- User Activity Tracking using javascript library [closed]
- Boolean HTML Attributes
- How to swap DOM child nodes in JavaScript?
- Is it bad practice to add properties to DOM nodes?
- Adding Event Listeners on Elements – Javascript
- Why is document.getElementById(‘tableId’).innerHTML not working in IE8?