The example in this article describes how to obtain the position of a specified element using JavaScript. Share it with everyone for your reference. The details are as follows:
I hope this article will be helpful to everyone’s JavaScript programming design.