[Html]... & lt; tr & gt; & lt; tdname & amp; #39; subbtn & amp; #39; id & amp; #39; subbtn & amp; #39; & gt; afdfa & lt;/td & gt; & lt; td & gt; adda & lt;/td & gt; & lt; td & gt; 3dd & lt; /td & gt; & lt;/tr & gt;
[Html]
....
AfdfaAdda3dd
DdbbBddd5dd
CcddFdd5d55
....
Script
Var sub = document. getElementById ("subbtn ");
Var thb = document. getElementById ("thid ");
Var ths = document. getElementsByTagName ("th ");
Var value = ths [0]. innerHTML;
Thfirst = ths [0];
Value = thfirst. nextSibling. innerHTML;
Alert (value)
Alert (sub. name)
Script
Document Tree node
ParentElement parent Element
ParentNode parent node
All child nodes of childNodes have s.
First child node of firstChild
Last child node of lastChild
Next sibling node of nextSibling
A sibling node on previussibling
You can use innerHTML to obtain the value of an element.
GetElementsByTagName
Var item = document. getElementById ('id'). getElementsByTagName ("tag name ");
Item [1] is the first tag (in IE, it is the second tag, and IE starts counting from 0)
Author: cjh6311882