From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- .../global_objects/string/quote/index.html | 116 --------------------- 1 file changed, 116 deletions(-) delete mode 100644 files/zh-cn/web/javascript/reference/global_objects/string/quote/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/string') diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/quote/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/quote/index.html deleted file mode 100644 index 3d8d197f46..0000000000 --- a/files/zh-cn/web/javascript/reference/global_objects/string/quote/index.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: String.prototype.quote() -slug: Web/JavaScript/Reference/Global_Objects/String/quote -tags: - - JavaScript - - Method - - Non-standard - - Obsolete - - Prototype - - String -translation_of: Archive/Web/JavaScript/String.quote ---- -
{{obsolete_header("37")}}
- -
{{JSRef("Global_Objects", "String")}}{{Non-standard_header}}
- -

概述

- -

将字符串中包含的特殊字符进行转义(反斜杠),然后在字符串两边各加上一个双引号(")并返回,并不修改原字符串.

- -

语法

- -
str.quote()
- -

示例

- - - - - - - - - - - - - - - - - - - - - - - - - - -
strstr.quote()eval(str.quote())
Hello world!"Hello world!"Hello world!
Hello
-         world!
"Hello\n\tworld!"Hello
-         world!
" \ — '"\" \\ \u2014 '"" \ — '
- -

规范

- -

不在任何规范中。实现于 JavaScript 1.3.

- -

浏览器兼容性

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -

相关链接

- - -- cgit v1.2.3-54-g00ecf