aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/string/length/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/string/length/index.html')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/string/length/index.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/length/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/length/index.html
index bf49c313f0..afef2dd204 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/string/length/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/string/length/index.html
@@ -10,11 +10,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/length
---
<p>{{JSRef("Global_Objects", "String")}}</p>
-<h2 id="Summary" name="Summary">概述</h2>
+<h2 id="Summary">概述</h2>
<p><strong>length</strong> 属性表示一个字符串的长度。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>该属性返回字符串中字符编码单元的数量。JavaScript 使用 {{ interwiki("wikipedia", "UTF-16") }} 编码,该编码使用一个 16 比特的编码单元来表示大部分常见的字符,使用两个代码单元表示不常用的字符。因此 length 返回值可能与字符串中实际的字符数量不相同。</p>
@@ -22,7 +22,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/length
<p>静态属性 <strong>String.length</strong> 返回 1。</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
<pre class="brush: js">var x = "Mozilla";
var empty = "";
@@ -112,7 +112,7 @@ console.log("The empty string is has a length of " + empty.length);
</table>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><a class="external external-icon" href="http://developer.teradata.com/blog/jasonstrimpel/2011/11/javascript-string-length-and-internationalizing-web-applications">JavaScript String.length and Internationalizing Web Applications</a></li>