I have a <span id="posid">HERE</span> in a html page. Is there a way to find the x, y coordinates? I'd like to scroll the window to that element if it is embedded in a large page and is out of the visible range.
I need its position because I built a key word search function. If a word matches the pattern, the window will move to that position where the element is located. In the whole page, there is only one <span id="posid"></span>.
It is appreciated much if you could offer any help.
Fox12
I need its position because I built a key word search function. If a word matches the pattern, the window will move to that position where the element is located. In the whole page, there is only one <span id="posid"></span>.
It is appreciated much if you could offer any help.
Fox12