aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/errors/no_properties/index.html
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/javascript/reference/errors/no_properties/index.html
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/javascript/reference/errors/no_properties/index.html')
-rw-r--r--files/zh-cn/web/javascript/reference/errors/no_properties/index.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/files/zh-cn/web/javascript/reference/errors/no_properties/index.html b/files/zh-cn/web/javascript/reference/errors/no_properties/index.html
new file mode 100644
index 0000000000..5e904dd8ab
--- /dev/null
+++ b/files/zh-cn/web/javascript/reference/errors/no_properties/index.html
@@ -0,0 +1,36 @@
+---
+title: 'TypeError: "x" has no properties'
+slug: Web/JavaScript/Reference/Errors/No_properties
+translation_of: Web/JavaScript/Reference/Errors/No_properties
+---
+<div>{{jsSidebar("Errors")}}</div>
+
+<h2 id="错误信息">错误信息</h2>
+
+<pre class="syntaxbox">TypeError: null has no properties
+TypeError: undefined has no properties
+</pre>
+
+<h2 id="错误类型">错误类型</h2>
+
+<p>{{jsxref("TypeError")}}.</p>
+
+<h2 id="哪里出错了">哪里出错了?</h2>
+
+<p> {{jsxref("null")}} 和 {{jsxref("undefined")}}中,没有你需要的属性。</p>
+
+<h2 id="例子">例子</h2>
+
+<pre class="brush: js example-bad">null.foo;
+// 错误类型: null没有这个属性
+
+undefined.bar;
+// 错误类型: undefined没有这个属性
+</pre>
+
+<h2 id="参考">参考</h2>
+
+<ul>
+ <li>{{jsxref("null")}}</li>
+ <li>{{jsxref("undefined")}}</li>
+</ul>