removeElementsChildren

Removes the child elements of the specified element corresponding to the specified tag.

Syntax

removeElementsChildren = function(aElements, aTagName);

Parameters

  • aElements
    • functions: target array of elements
  • aTagName
    • functions: tag of elements to delete

Notes

  • If aTagName is an empty string, it will be deleted child elements that match any tag.

Examples

  1. //loading the page google.ru with request
    loadURI('https://www.google.ru/#newwindow=1&q=test+request');
    //Get the elements h3
    var elements = getElements('h3');
    //Remove the child links
    removeElementsChildren(elements,'a');