Current location - Quotes Website - Signature design - How to delete HTML-specific tags and their contents?
How to delete HTML-specific tags and their contents?
& lthtml & gt

& lthead & gt

& lttitle & gt delete tag

& lt script & gt

//Delete method. Parameter obj is the object to be deleted.

Function deelement (obj) (

//Use the removeChild () method to delete nodes, which is compatible with all major browsers.

obj . parent node . remove child(obj);

}

& lt/script & gt;

& lt/head & gt;

& ltbody & gt

& ltdiv onclick = " dele element(this)" & gt; Click Delete Label.

& ltdiv onclick = " dele element(this)" & gt; Click Delete Label.

& ltdiv onclick = " dele element(this)" & gt; Click Delete Label.

& ltdiv onclick = " dele element(this)" & gt; Click Delete Label.

& ltdiv onclick = " dele element(this)" & gt; Click Delete Label.

& lt/body & gt;

& lt/html & gt;