From 012ee621791b6895e637f96e6523027951768f25 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:03:27 +0800 Subject: remove inline style for zh-CN --- .../global_objects/string/length/index.html | 56 ++++++++-------------- 1 file changed, 20 insertions(+), 36 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/string/length/index.html') 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 9ec301ff64..bf49c313f0 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 ---

{{JSRef("Global_Objects", "String")}}

-

概述

+

概述

length 属性表示一个字符串的长度。

-

描述

+

描述

该属性返回字符串中字符编码单元的数量。JavaScript 使用 {{ interwiki("wikipedia", "UTF-16") }} 编码,该编码使用一个 16 比特的编码单元来表示大部分常见的字符,使用两个代码单元表示不常用的字符。因此 length 返回值可能与字符串中实际的字符数量不相同。

@@ -22,7 +22,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/length

静态属性 String.length 返回 1。

-

示例

+

示例

var x = "Mozilla";
 var empty = "";
@@ -33,23 +33,7 @@ console.log("Mozilla is " + x.length + " code units long");
 console.log("The empty string is has a length of " + empty.length);
 /* "The empty string is has a length of 0" */
-
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -
 
- -

规范

+

规范

@@ -76,7 +60,7 @@ console.log("The empty string is has a length of " + empty.length);
-

浏览器兼容性

+

浏览器兼容性

{{ CompatibilityTable() }}

@@ -84,12 +68,12 @@ console.log("The empty string is has a length of " + empty.length); - - - - - - + + + + + + @@ -107,13 +91,13 @@ console.log("The empty string is has a length of " + empty.length);
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafariFeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support
- - - - - - - + + + + + + + @@ -128,8 +112,8 @@ console.log("The empty string is has a length of " + empty.length);
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileFeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support
-

相关链接

+

相关链接

-- cgit v1.2.3-54-g00ecf