Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to remove first child in javascript

var queue = document.getElementById('queue'); // Get the list whose id is queue.
var elements = queue.getElementsByTagName('li'); // Get HTMLCollection of elements with the li tag name.
queue.removeChild(elements[0]); // Remove the child from queue that is the first li element.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #child #javascript
ADD COMMENT
Topic
Name
6+8 =