aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/text/iselementcontentwhitespace
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/text/iselementcontentwhitespace
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/text/iselementcontentwhitespace')
-rw-r--r--files/zh-cn/web/api/text/iselementcontentwhitespace/index.html29
1 files changed, 29 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/text/iselementcontentwhitespace/index.html b/files/zh-cn/web/api/text/iselementcontentwhitespace/index.html
new file mode 100644
index 0000000000..d138ce0a59
--- /dev/null
+++ b/files/zh-cn/web/api/text/iselementcontentwhitespace/index.html
@@ -0,0 +1,29 @@
+---
+title: Text.isElementContentWhitespace
+slug: Web/API/Text/isElementContentWhitespace
+translation_of: Web/API/Text/isElementContentWhitespace
+---
+<p>{{ ApiRef() }}</p>
+<p>{{ obsolete_header("") }}</p>
+<p>返回一个布尔值,表明该文本节点的内容是否全部是由空白符组成的.</p>
+<div class="warning">
+ <strong>警告: </strong>该属性已经在DOM level 4中被废弃, 在一些新版本的浏览器(Gecko 10.0 )中已经被删除.</div>
+<h3 id="Syntax" name="Syntax">语法</h3>
+<pre class="eval"><em>b</em> = textnode.isElementContentWhitespace;
+</pre>
+<h3 id="Example" name="Example">例子</h3>
+<p>下例中 ,我们创建了一个内容为空白符和文字组成的文本节点.该节点的isElementContentWhitespace属性为false.</p>
+<pre class="brush: js">var tn = document.createTextNode("Hello world");
+tn.isElementContentWhitespace; /* 返回false */
+</pre>
+<p>下例中 ,我们创建了一个内容全部为空白符的文本节点.该节点的isElementContentWhitespace属性为true.</p>
+<pre class="brush: js">var ws = document.createTextNode(" \t \r\n ")
+ws.isElementContentWhitespace; /* 返回true */
+</pre>
+<h3 id="Specification" name="Specification">规范</h3>
+<p><a class="external" href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#Text3-isElementContentWhitespace" title="http://www.w3.org/TR/DOM-Level-3-Core/core.html#Text3-isElementContentWhitespace">DOM Level 3 Core: Text.isElementContentWhitespace</a></p>
+<h3 id="相关链接">相关链接</h3>
+<ul>
+ <li><a class="internal" href="/zh-cn/DOM/Text" title="zh-cn/DOM/Text"><code>Text</code></a></li>
+</ul>
+<p>{{ languages( { "en": "en/DOM/Text.isElementContentWhitespace" } ) }}</p>