JS can be obtained,
document.getElementById ("Div ID or other selection"). OffsetTop; it's off the top.
JQ can do this:
$ ("#aaa"). Offset (). Top; JQ gets the distance of the AAA element from the body
document.getElementById ("DDHDH"). InnerHTML can get all the data in the div, including the tags ... But it's only used in IE and opera.
document.getElementById ("DDHDH"). InnerTEXT can get the text data into the Div, not get to the label ... But it's only used in IE and opera.
document.getElementById ("text"). Textcontent used to get data in Firefox
IndexOf usage
Strobj.indexof (substring,[StartIndex])
Parameters
Strobj
Required option. A String object or literal.
SubString
Required option. The substring to find in the string object.
Starindex
Options are available. The integer value that indicates the index at which to start the lookup within a String object. If omitted, it is searched from the beginning of the string.
The IndexOf method returns an integer value that indicates the starting position of the substring in the string object. If no substring is found, 1 is returned.
How to get div distance from top of browser height, width, content