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

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,22 +1,22 @@
<article id="wikiArticle">
<div></div>
<h2 id="信息">信息</h2>
<pre class="syntaxbox">RangeError: repeat count must be non-negative (Firefox)
<pre><code class="language-javascript">RangeError: repeat count must be non-negative (Firefox)
RangeError: Invalid count value (Chrome)
</pre>
</code></pre>
<h2 id="错误类型">错误类型</h2>
<p><a href="Reference/Global_Objects/RangeError" title="RangeError对象标明一个错误当一个值不在其所允许的范围或者集合中。"><code>RangeError</code></a></p>
<h2 id="发生了什么">发生了什么?</h2>
<p>代码中使用了 <a href="Reference/Global_Objects/String/repeat" title="repeat() 构造并返回一个新字符串,该字符串包含被连接在一起的指定数量的字符串的副本。"><code>String.prototype.repeat()</code></a>方法。<span class="short_text" id="result_box" lang="zh-CN"><span>它有一个计数参数,表示重复该字符串的次数</span></span>。该参数必须在 0 及正 <a href="Reference/Global_Objects/Infinity" title="全局属性 Infinity 是一个数值,表示无穷大。"><code>Infinity</code></a> 之间,且不能为负数。该值的合法范围可以这样表示: [0, +∞)。</p>
<h2 id="示例">示例</h2>
<h3 id="无效的">无效的</h3>
<pre class="brush: js example-bad">'abc'.repeat(-1); // RangeError </pre>
<pre><code class="language-js example-bad">'abc'.repeat(-1); // RangeError </code></pre>
<h3 id="有效的">有效的</h3>
<pre class="brush: js example-good">'abc'.repeat(0); // ''
<pre><code class="language-js example-good">'abc'.repeat(0); // ''
'abc'.repeat(1); // 'abc'
'abc'.repeat(2); // 'abcabc'
'abc'.repeat(3.5); // 'abcabcabc' (count will be converted to integer)
</pre>
</code></pre>
<h2 id="See_also">See also</h2>
<ul>
<li><a href="Reference/Global_Objects/String/repeat" title="repeat() 构造并返回一个新字符串,该字符串包含被连接在一起的指定数量的字符串的副本。"><code>String.prototype.repeat()</code></a></li>