增加自定义插件,新增js,java,vue,jquery手册

This commit is contained in:
fofolee
2019-04-18 16:49:06 +08:00
parent 6ec74eefc3
commit 1e8f76c000
5934 changed files with 2276419 additions and 926 deletions

View File

@@ -0,0 +1,38 @@
<article id="wikiArticle">
<div></div>
<h2 id="消息">消息</h2>
<pre class="syntaxbox">TypeError: Unable to get property {x} of undefined or null reference (Edge)
TypeError: can't access property {x} of {y} (Firefox)
TypeError: {y} is undefined, can't access property {x} of it (Firefox)
TypeError: {y} is null, can't access property {x} of it (Firefox)
Examples:
TypeError: x is undefined, can't access property "prop" of it
TypeError: x is null, can't access property "prop" of it
TypeError: can't access property "prop" of undefined
TypeError: can't access property "prop" of null
</pre>
<h2 id="错误类型">错误类型</h2>
<p><a href="Reference/Global_Objects/TypeError" title="TypeError类型错误 对象用来表示值的类型非预期类型时发生的错误。"><code>TypeError</code></a>.</p>
<h2 id="哪里出错了">哪里出错了?</h2>
<p>访问了 <a href="Reference/Global_Objects/undefined" title="undefined是全局对象的一个属性。也就是说它是全局作用域的一个变量。undefined的最初值就是原始数据类型undefined。"><code>undefined</code></a><a href="Reference/Global_Objects/null" title="值 null 特指对象的值未设置。它是 JavaScript 基本类型 之一。"><code>null</code></a> 值的属性.</p>
<h2 id="例子">例子</h2>
<h3 id="无效情形">无效情形</h3>
<pre class="brush: js example-bad">// 对于undefined 以及 null 值, substring 方法无法正常工作
var foo = undefined;
foo.substring(1); // TypeError: x is undefined, can't access property "substring" of it
var foo = null;
foo.substring(1); // TypeError: x is null, can't access property "substring" of it
</pre>
<h3 id="解决问题">解决问题</h3>
<p>为了解决<code>undefined</code> 或 <code>null</code> 值的空指针问题,你可以使用 <a href="/en-US/docs/Web/JavaScript/Reference/Operators/typeof">typeof</a> 操作符, 比如.</p>
<pre class="brush: js">if (typeof foo !== 'undefined') {
// 现在已经确认foo已定义可以进一步操作.
}</pre>
<h2 id="参考更多">参考更多</h2>
<ul>
<li><a href="Reference/Global_Objects/undefined" title="undefined是全局对象的一个属性。也就是说它是全局作用域的一个变量。undefined的最初值就是原始数据类型undefined。"><code>undefined</code></a></li>
<li><a href="Reference/Global_Objects/null" title="值 null 特指对象的值未设置。它是 JavaScript 基本类型 之一。"><code>null</code></a></li>
</ul>
</article>