Answers for "how to remove a content in a spific html tag"

4

remove div javascript

var div = document.getElementById('div-01');
div.remove();
Posted by: Guest on June-16-2020
-1

remove html between 2 tags javas

var myString = "<table><tr><td>Some text ...<a href='#'>label...</a></td></tr></table";
myString += "<table><tr><td>Some text ...<a href='#'>label...</a></td></tr></table";
myString += "<table><tr><td>Some text ...<a href='#'>label...</a></td></tr></table";

console.log(myString);

var anchorTagsRemoved = myString.replace(/<a.*>.*?<\/a>/ig,'');
console.log(anchorTagsRemoved);
Posted by: Guest on January-07-2021

Code answers related to "how to remove a content in a spific html tag"

Code answers related to "Javascript"

Browse Popular Code Answers by Language