"Feature description"
Use RemoveChild to make simple reverse removal effects
"HTML code description"
<ul class= "list" id= "list" > <li class= "in" >1</li> <li class= "in" >2</li> <li class= ' in ' >3</li> <li class= ' in ' >4</li> <li class= ' in ' >5</li> <li class= "in" >6</li> </ul>
"CSS Code description"
. In{ height:20px; line-height:20px; width:20px; background-Color:blue; text-Align:center; Color:white;}
"JS Code description"
<script>varOlist = document.getElementById (' list ');functionIncrementnumber () {//gets the number of neutron elements in the olist varLen = olist.getelementsbytagname (' li '). length; //If the length is not 0 if(len) {//Delete Last child elementOlist.removechild (Olist.getelementsbytagname (' Li ') [len-1]); //Call the timer againSetTimeout (incrementnumber,1000); }}//1s post-execution function IncrementnumberSetTimeout (incrementnumber,1000);</script>
"Effect Show"
"Source View"
Use RemoveChild to make simple reverse removal effect "Jsdemo"