diff options
author | t7yang <t7yang@gmail.com> | 2022-01-10 08:38:07 +0800 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
commit | c40612041809fe289aba58aefa170bbe784aba1f (patch) | |
tree | 8ca89b071d04afcf7abd6d9a04d0765a041d9c8a /files/zh-cn/web/javascript/reference/global_objects/regexp/lastindex | |
parent | 12a899ab8540bc84f56a0dc6491be80a48499d49 (diff) | |
download | translated-content-c40612041809fe289aba58aefa170bbe784aba1f.tar.gz translated-content-c40612041809fe289aba58aefa170bbe784aba1f.tar.bz2 translated-content-c40612041809fe289aba58aefa170bbe784aba1f.zip |
remove name attribute for zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/regexp/lastindex')
-rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/regexp/lastindex/index.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/regexp/lastindex/index.html b/files/zh-cn/web/javascript/reference/global_objects/regexp/lastindex/index.html index 92dadc8159..ddfe60c595 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/regexp/lastindex/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/regexp/lastindex/index.html @@ -10,13 +10,13 @@ translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex --- <div> {{JSRef("Global_Objects", "RegExp")}}</div> -<h2 id="Summary" name="Summary">概述</h2> +<h2 id="Summary">概述</h2> <p><code><strong>lastIndex</strong></code> 是正则表达式的一个可读可写的整型属性,用来指定下一次匹配的起始索引。</p> <div> {{js_property_attributes(1,0,0)}}</div> <h2 id="语法">语法</h2> <pre class="syntaxbox language-html"><var>lastIndex</var> = <var>regExpObj</var>.lastIndex;</pre> -<h2 id="Description" name="Description">描述</h2> +<h2 id="Description">描述</h2> <p>只有正则表达式使用了表示全局检索的 "<code>g</code>" 标志时,该属性才会起作用。此时应用下面的规则:</p> <ul> <li>如果 <code>lastIndex</code> 大于字符串的长度,则 <code>regexp.test</code> 和 <code>regexp.exec</code> 将会匹配失败,然后 <code>lastIndex</code> 被设置为 0。</li> @@ -111,7 +111,7 @@ console.log(re.lastIndex);</pre> </tbody> </table> </div> -<h2 id="See_also" name="See_also">相关链接</h2> +<h2 id="See_also">相关链接</h2> <ul> <li>{{jsxref("RegExp.prototype.ignoreCase")}}</li> <li>{{jsxref("RegExp.prototype.global")}}</li> |