Remove DOM Text From Variable With JQuery
I need to Remove this First Name : ONLY. I have already assign it to a variable. how to remove only that from DOM. example: First Name :
Solution 1:
You can use removeChild() method like
var node = document.getElementById('firstName')['previousSibling'],
label = node.nodeValue;
node.parentNode.removeChild(node);
Demo: Fiddle
Post a Comment for "Remove DOM Text From Variable With JQuery"