diff options
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/string/slice')
-rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/string/slice/index.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/slice/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/slice/index.html index df8f398983..35f5dd5736 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/string/slice/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/string/slice/index.html @@ -29,7 +29,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/slice <dt><code>beginIndex</code></dt> <dd>从该索引(以 0 为基数)处开始提取原字符串中的字符。如果值为负数,会被当做 <code>strLength + beginIndex</code> 看待,这里的<code>strLength</code> 是字符串的长度(例如, 如果 <code>beginIndex</code> 是 -3 则看作是:<code>strLength - 3</code>)</dd> <dt><code>endIndex</code></dt> - <dd>可选。在该索引(以 0 为基数)处结束提取字符串。如果省略该参数,<code style="font-style: normal;">slice()</code> 会一直提取到字符串末尾。<span style="line-height: 1.5;">如果该参数为负数,则被看作是 strLength + endIndex,这里的 strLength 就是字符串的长度(例如,如果 endIndex 是 -3,则是, strLength - 3)。</span></dd> + <dd>可选。在该索引(以 0 为基数)处结束提取字符串。如果省略该参数,<code style="font-style: normal;">slice()</code> 会一直提取到字符串末尾。如果该参数为负数,则被看作是 strLength + endIndex,这里的 strLength 就是字符串的长度(例如,如果 endIndex 是 -3,则是, strLength - 3)。</dd> </dl> <h3 id="返回值">返回值</h3> |