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

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">RangeError: invalid array length (Firefox)
<pre><code class="language-javascript">RangeError: invalid array length (Firefox)
RangeError: Invalid array length (Chrome)
RangeError: Invalid array buffer length (Chrome)
</pre>
</code></pre>
<h2 id="错误类型">错误类型</h2>
<p><a href="Reference/Global_Objects/RangeError" title="RangeError对象标明一个错误当一个值不在其所允许的范围或者集合中。"><code>RangeError</code></a></p>
<h2 id="什么地方出错了">什么地方出错了?</h2>
@@ -18,7 +18,7 @@ RangeError: Invalid array buffer length (Chrome)
<p>或者说,你想要在设置数组之前确定它的长度,或把它作为一个构造函数的参数。</p>
<h2 id="示例">示例</h2>
<h3 id="错误的示例">错误的示例</h3>
<pre class="brush: js example-bad">new Array(Math.pow(2, 40))
<pre><code class="language-js example-bad">new Array(Math.pow(2, 40))
new Array(-1)
new ArrayBuffer(Math.pow(2, 32))
new ArrayBuffer(-1)
@@ -28,9 +28,9 @@ a.length = a.length - 1; // 将 length 属性的值设置为 -1
let b = new Array(Math.pow(2, 32) - 1);
b.length = b.length + 1; // 将 length 属性的值设置为 2^32
</pre>
</code></pre>
<h3 id="正确的示例">正确的示例</h3>
<pre class="brush: js example-good">[ Math.pow(2, 40) ] // [ 1099511627776 ]
<pre><code class="language-js example-good">[ Math.pow(2, 40) ] // [ 1099511627776 ]
[ -1 ] // [ -1 ]
new ArrayBuffer(Math.pow(2, 32) - 1)
new ArrayBuffer(0)
@@ -43,7 +43,7 @@ b.length = Math.min(0xffffffff, b.length + 1);
// 0xffffffff 是 2^32 - 1 的 十六进制 表示方式
// 它也可以被写作 (-1 &gt;&gt;&gt; 0)
</pre>
</code></pre>
<h2 id="相关页面">相关页面</h2>
<ul>
<li><a href="Reference/Array" title="REDIRECT Array"><code>Array</code></a></li>