There are a lot of ways to
clear labels, and here's a good example of all the tags below div, and the friends you need can refer to the following
Code as follows: <div id= "Slides" > <div id= "Content-main" name= "Content-main" > <div id= "a" >& nbsp <img src= "Img/example-slide-1.jpg" alt= "1" > </div> </div> <div id= " Content-main "Name=" Content-main "> <div id=" B "> <img src=" img/example-slide-2.jpg "alt=" 1 " > </div> </div> </div> <input id= "P" type= "button" value= "Add" Onclick= "Add1 ();" /> <input id= "P" type= "button" value= "add33" onclick= "clear ();" /> Code as follows: function Add1 () {///Add a div content-main var obj=document.createelement ("div"); Obj.id= "Content-main"; obj.innerhtml= ' <div id= ' C ' > ' + ' <img src= ' img/example-slide-3.jpg ' "alt=" 3 "> ' + ' </div> '; $ (' #slides '). Append (obj); } function Clear () {// Clears all div and img var div1=document.getelementbyid ("slides") under Slides. getElementsByTagName ("div"); for (Var i=0;i<div1.length;i++) { div1[i].innerhtml= '; } } code is as follows: function Clearalltext ( Divinput) {//empty div with more text text box contents, reset var txts = document.getElementById (' Divinput '). getElementsByTagName ("Input "); for (var i=0;i<txts.length;i++) { if (txts[i].type==" text ") { txts[i].value =" ";//text empty } } var selects = document.getElementById (' Divinput '). getElementsByTagName ("select"); for ( var i=0;i<selects.length;i++) { selects[i].options[0].selected = true;//Select First } } & nbsp