diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/htmltableelement/rows/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/htmltableelement/rows/index.html')
-rw-r--r-- | files/zh-cn/web/api/htmltableelement/rows/index.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/htmltableelement/rows/index.html b/files/zh-cn/web/api/htmltableelement/rows/index.html new file mode 100644 index 0000000000..af8619af5e --- /dev/null +++ b/files/zh-cn/web/api/htmltableelement/rows/index.html @@ -0,0 +1,37 @@ +--- +title: HTMLTableElement.rows +slug: Web/API/HTMLTableElement/rows +tags: + - HTML Table Element + - HTMLTableElement.cells + - HTMLTableElement.rows +translation_of: Web/API/HTMLTableElement/rows +--- +<div> +<div> +<div>{{APIRef("HTML DOM")}}</div> + +<div>表中所有行的</div> +</div> +</div> + +<p><code><strong>HTMLTableElement.rows</strong></code> 只读属性返回表中所有行的一个活的 {{domxref("HTMLCollection")}}。<code><strong>HTMLTableElement.rows</strong></code> 包括与之相关的{{HTMLElement("thead")}}, {{HTMLElement("tfoot")}} 和 {{HTMLElement("tbody")}} 元素.</p> + +<p>Although the property is read-only, the returned object is live and allows the modification of its content.</p> + +<h2 id="Syntax" name="Syntax">Syntax</h2> + +<pre class="syntaxbox"><em>HTMLCollectionObject</em> = table.rows</pre> + +<h2 id="Example" name="Example">Example</h2> + +<pre class="brush:js">myrows = mytable.rows; +firstRow = mytable.rows[0]; +lastRow = mytable.rows[mytable.rows.length-1];</pre> + +<h2 id="Specification" name="Specification">Specification</h2> + +<ul> + <li><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-6156016">rows</a></li> + <li><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-75708506">HTMLcollection</a></li> +</ul> |