Element Child
From UBot Studio
				
								
				(Difference between revisions)
				
																
				
				
								
				| Line 1: | Line 1: | ||
| $Element Child is a [[Browser Functions|Browser Function]]. | $Element Child is a [[Browser Functions|Browser Function]]. | ||
| − | This function returns the child of a selected element. | + | This function returns the child of a selected element. To understand what determines an element as the child of another element, please see [http://www.w3schools.com/js/js_htmldom_navigation.asp JavaScript HTML DOM Navigation] | 
| $element child gets the child html element of the one matched with the selector. | $element child gets the child html element of the one matched with the selector. | ||
Latest revision as of 16:19, 24 December 2013
$Element Child is a Browser Function.
This function returns the child of a selected element. To understand what determines an element as the child of another element, please see JavaScript HTML DOM Navigation
$element child gets the child html element of the one matched with the selector.
The Element Selector is used to select an item.
Element: The desired page element.
[edit] Example
load html("<html>
    
  <head>
    <title>DOM Tutorial</title>
  </head>
  
  <body>
    <h1>DOM Lesson one</h1>
    <p>Hello world!</p>
  </body>
</html>")
set(#child, $scrape attribute($element child($element offset(<tagname="html">, 0)), "innertext"), "Global")
The set command returns: "DOM Tutorial", which is the child of the selected tag HTML.
