I want to unload a specific script(example.js) on my html page dynamically, which I can do by
var elem = document.getElementById("scid");
elem.parentElement.removeChild(elem);
where scid is the script id
but stll the elements of the script remain , as the script once executed leaves its attributes even after removing the tag.
Is there any way to completely remove the javascript with all its elements and attributes?