aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/string/lastindexof
diff options
context:
space:
mode:
authort7yang <t7yang@gmail.com>2022-01-10 08:38:07 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commitc40612041809fe289aba58aefa170bbe784aba1f (patch)
tree8ca89b071d04afcf7abd6d9a04d0765a041d9c8a /files/zh-cn/web/javascript/reference/global_objects/string/lastindexof
parent12a899ab8540bc84f56a0dc6491be80a48499d49 (diff)
downloadtranslated-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/string/lastindexof')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/string/lastindexof/index.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/lastindexof/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/lastindexof/index.html
index 56ba74598a..297d9f6d89 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/string/lastindexof/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/string/lastindexof/index.html
@@ -9,11 +9,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/lastIndexOf
<p>该方法将从尾到头地检索字符串 <em>str</em>,看它是否含有子串 <em>searchValue</em>。开始检索的位置在字符串的 <em>fromIndex</em> 处或字符串的结尾(没有指定 <em>fromIndex</em> 时)。如果找到一个 <em>searchValue</em>,则返回 <em>searchValue</em> 的第一个字符在 <em>str</em> 中的位置。<em>str</em>中的字符位置是从 0 开始的。</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><em>str</em>.lastIndexOf(<em>searchValue</em>[, fromIndex])</code></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>searchValue</code></dt>
@@ -27,7 +27,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/lastIndexOf
<p>返回指定值最后一次出现的索引(该索引仍是以从左至右0开始记数的),如果没找到则返回-1。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>字符串中的字符被从左向右索引。首字符的索引(index)是 0,最后一个字符的索引是 <code>stringName.length - 1</code>。</p>
@@ -47,15 +47,15 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/lastIndexOf
<p>(例如'abadefgabm'.lastIndexOf('ab', 7) 返回7,虽然查找的'ab'中的b已经在 index=8的位置了从index=7的a处向左查找仍是能找到自身a加上其后连成ab,因为fromIndex指的是待匹配字符串的开头那一个)</p>
-<h3 id="Example_indexOf_and_case-sensitivity" name="Example:_indexOf_and_case-sensitivity">区分大小写</h3>
+<h3 id="Example_indexOf_and_case-sensitivity">区分大小写</h3>
<p><code>lastIndexOf</code> 方法区分大小写。例如,下面的表达式返回 -1:</p>
<pre class="brush:js">"Blue Whale, Killer Whale".lastIndexOf("blue"); // returns -1</pre>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example_Using_indexOf_and_lastIndexOf" name="Example:_Using_indexOf_and_lastIndexOf">例子:使用 <code>indexOf</code> 和 <code>lastIndexOf</code></h3>
+<h3 id="Example_Using_indexOf_and_lastIndexOf">例子:使用 <code>indexOf</code> 和 <code>lastIndexOf</code></h3>
<p>下例使用 <code>indexOf</code> 和 <code>lastIndexOf</code> 方法来定位字符串 "<code>Brave new world</code>" 中的值。</p>