Element Child
From UBot Studio
(Difference between revisions)
| Line 13: | Line 13: | ||
<pre> | <pre> | ||
| − | + | 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") | ||
| + | |||
| + | </pre> | ||
| − | + | The set command returns: "DOM Lesson one", which is the child of the selected tag HTML. | |
Revision as of 16:04, 24 December 2013
$Element Child is a Browser Function.
This function returns the child of a selected element.
$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.
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 Lesson one", which is the child of the selected tag HTML.