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

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,14 +1,14 @@
<article id="wikiArticle">
<div></div>
<h2 id="Message">Message</h2>
<pre class="syntaxbox">ReferenceError: invalid assignment left-hand side
</pre>
<pre><code class="language-javascript">ReferenceError: invalid assignment left-hand side
</code></pre>
<h2 id="Error_type">Error type</h2>
<p><a href="Reference/Global_Objects/ReferenceError" title="ReferenceError引用错误 对象代表当一个不存在的变量被引用时发生的错误。"><code>ReferenceError</code></a>.</p>
<h2 id="What_went_wrong">What went wrong?</h2>
<p>有时会出现不可预料的赋值情况。这可能是因为<a href="Reference/Operators/Assignment_Operators">赋值运算符</a><a href="Reference/Operators/Comparison_Operators">比较运算符</a>不匹配的缘故。正确的是,使用“=”号将值赋给一个变量,使用“==”或者“===”来比较一个值。</p>
<h2 id="Examples">Examples</h2>
<pre class="brush: js example-bad">if (Math.PI = 3 || Math.PI = 4) {
<pre><code class="language-js example-bad">if (Math.PI = 3 || Math.PI = 4) {
console.log('no way!');
}
// ReferenceError: invalid assignment left-hand side
@@ -17,16 +17,16 @@ var str = 'Hello, '
+= 'is it me '
+= 'you\'re looking for?';
// ReferenceError: invalid assignment left-hand side
</pre>
</code></pre>
<p><code>if</code> 语句中,你要使用比较运算符("=="),而在字符串连接中,使用加号运算符("+")。</p>
<pre class="brush: js example-good">if (Math.PI == 3 || Math.PI == 4) {
<pre><code class="language-js example-good">if (Math.PI == 3 || Math.PI == 4) {
console.log('no way!');
}
var str = 'Hello, '
+ 'from the '
+ 'other side!';
</pre>
</code></pre>
<h2 id="See_also">See also</h2>
<ul>
<li><a href="Reference/Operators/Assignment_Operators">赋值运算符</a></li>