非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
msElementsFromRect
method returns the node list of elements that are under a rectangle defined by left, top, width, and height.
This proprietary method is specific to Internet Explorer and Microsoft Edge.
object.msElementsFromRect(left, top, width, height, retVal)
To find all of the elements under a given point, use
msElementsFromPoint(x, y)
. To find all of the elements which intersect a rectangle, use
msElementsFromRect(top, left, width, height)
.
var nodeList = document.msElementsFromRect(x,y,width,height) var nodeList = document.msElementsFromPoint(x,y)
The returned nodeList is sorted by z-index so that you can tell the relative stacking order of the elements.