diff options
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/string/padstart/index.html')
-rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/string/padstart/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/padstart/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/padstart/index.html index c358da2585..1d1a9c1176 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/string/padstart/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/string/padstart/index.html @@ -35,7 +35,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/padStart <h2 id="示例">示例</h2> -<pre class="brush: js line-numbers language-js">'abc'.padStart(10); // " abc" +<pre class="brush: js">'abc'.padStart(10); // " abc" 'abc'.padStart(10, "foo"); // "foofoofabc" 'abc'.padStart(6,"123465"); // "123abc" 'abc'.padStart(8, "0"); // "00000abc" @@ -45,7 +45,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/padStart <p>如果原生环境不支持该方法,在其他代码之前先运行下面的代码,将创建 <code>String.prototype.padStart()</code> 方法。</p> -<pre class="brush: js line-numbers language-js">// https://github.com/uxitten/polyfill/blob/master/string.polyfill.js +<pre class="brush: js">// https://github.com/uxitten/polyfill/blob/master/string.polyfill.js // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart if (!String.prototype.padStart) { String.prototype.padStart = function padStart(targetLength,padString) { |