aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/document/elementsfrompoint/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/document/elementsfrompoint/index.html')
-rw-r--r--files/zh-cn/web/api/document/elementsfrompoint/index.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/document/elementsfrompoint/index.html b/files/zh-cn/web/api/document/elementsfrompoint/index.html
new file mode 100644
index 0000000000..bea911988b
--- /dev/null
+++ b/files/zh-cn/web/api/document/elementsfrompoint/index.html
@@ -0,0 +1,51 @@
+---
+title: DocumentOrShadowRoot.elementsFromPoint()
+slug: Web/API/Document/elementsFromPoint
+translation_of: Web/API/DocumentOrShadowRoot/elementsFromPoint
+original_slug: Web/API/DocumentOrShadowRoot/elementsFromPoint
+---
+<p>{{APIRef("Shadow DOM")}}{{SeeCompatTable}}</p>
+
+<p><span class="seoSummary"><strong><code>elementsFromPoint()</code></strong> 是 {{domxref("DocumentOrShadowRoot")}} 下的一个函数,该函数返还在特定坐标点下的HTML元素数组。</span></p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">var elements = document.elementsFromPoint(x, y);</pre>
+
+<h3 id="参数">参数</h3>
+
+<dl>
+ <dt>x</dt>
+ <dd>坐标点的水平坐标值</dd>
+ <dt>y</dt>
+ <dd>坐标点的垂向坐标值</dd>
+</dl>
+
+<h3 id="返回值">返回值</h3>
+
+<p>一个包含 {{domxref('element')}} 对象的数组.</p>
+
+<h2 id="其他说明">其他说明</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Shadow DOM','','elementsFromPoint()')}}</td>
+ <td>{{Spec2('Shadow DOM')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<div>
+
+
+<p>{{Compat("api.DocumentOrShadowRoot.elementsFromPoint")}}</p>
+</div>