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

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,8 +1,8 @@
<article id="wikiArticle">
<div></div>
<h2 id="消息">消息</h2>
<pre class="syntaxbox">TypeError: variable "x" redeclares argument (Firefox)
</pre>
<pre><code class="language-javascript">TypeError: variable "x" redeclares argument (Firefox)
</code></pre>
<h2 id="错误类型">错误类型</h2>
<p><a href="Reference/Global_Objects/TypeError" title="TypeError类型错误 对象用来表示值的类型非预期类型时发生的错误。"><code>TypeError</code></a> 警告仅仅在 <a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">严格模式下</a> 出现。</p>
<h2 id="哪里有问题?">哪里有问题?</h2>
@@ -11,20 +11,20 @@
<h2 id="示例">示例</h2>
<h3 id="无效情况">无效情况</h3>
<p>这个例子中,变量 <code>arg</code> 重新声明了参数。</p>
<pre class="brush: js example-bad">"use strict";
<pre><code class="language-js example-bad">"use strict";
function f(arg) {
var arg = "foo";
}
</pre>
</code></pre>
<h3 id="无效情况_2">无效情况</h3>
<p>为了修复警告,<code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/var">var</a></code> 语句应该被移除,因为变量已经存在。或者,你可以重命名函数参数或者变量名称。</p>
<pre class="brush: js example-good">"use strict";
<pre><code class="language-js example-good">"use strict";
function f(arg) {
arg = "foo";
}
</pre>
</code></pre>
<h2 id="另见">另见</h2>
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">严格模式</a></li>