非标
此特征是非标准的,且不在标准轨道中。不要在面向 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)
					

参数

left [in]
类型: 浮点
top [in]
类型: 浮点
width [in]
类型: 浮点
height [in]
类型: 浮点
retVal [out, reval]
类型: NodeList

范例

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.

另请参阅

元数据

  • 最后修改: