<div id=~3~>Industrial Goods<input type="button" value="Delete" onClick="DeleteThis('~3~|Industrial Goods')"><br></div>
So basically... it will delete itself..
Thanks!
You remove it from its parentNode.
Incidentally, attribute values should be quoted, and "~3~" is not a valid value for an id attribute.
so what weed refers to:
// Delete the specified element, specified by the TheElement ID function DelDiv(TheElement) { ToDelete = document.getElementById(TheElement); ToDelete.parentNode.removeChild(ToDelete); }