语法高亮,滚动条美化,设置页面调整

This commit is contained in:
fofolee
2019-04-19 02:41:09 +08:00
parent 1e8f76c000
commit 359d29ee0b
1590 changed files with 12328 additions and 11441 deletions

View File

@@ -1,10 +1,10 @@
<article id="wikiArticle">
<div></div>
<h2 id="信息">信息</h2>
<pre class="syntaxbox">ReferenceError: assignment to undeclared variable "x" (Firefox)
<pre><code class="language-javascript">ReferenceError: assignment to undeclared variable "x" (Firefox)
ReferenceError: "x" is not defined (Chrome)
ReferenceError: Variable undefined in strict mode (Edge)
</pre>
</code></pre>
<h2 id="错误类型">错误类型</h2>
<p>  仅在<a href="Reference/Strict_mode">严格模式</a>中出现 <a href="Reference/Global_Objects/ReferenceError" title="ReferenceError引用错误 对象代表当一个不存在的变量被引用时发生的错误。"><code>ReferenceError</code></a> 警告。</p>
<h2 id="发生了什么">发生了什么?</h2>
@@ -20,19 +20,19 @@ ReferenceError: Variable undefined in strict mode (Edge)
<h2 id="示例">示例</h2>
<h3 id="无效的">无效的</h3>
<p>在本例中,"bar" 是未声明的变量。</p>
<pre class="brush: js example-bad">function foo() {
<pre><code class="language-js example-bad">function foo() {
"use strict";
bar = true;
}
foo(); // ReferenceError: assignment to undeclared variable bar
</pre>
</code></pre>
<h3 id="有效的">有效的</h3>
<p>为了使 "bar" 是一个已声明变量,你需要在其前面加一个 var 关键字。</p>
<pre class="brush: js example-good">function foo() {
<pre><code class="language-js example-good">function foo() {
"use strict";
var bar = true;
}
foo();</pre>
foo();</code></pre>
<h2 id="相关">相关</h2>
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">Strict mode</a></li>