From d192fb918b0e2aa8869de6dcc59de8464b6e879a Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Fri, 11 Dec 2020 18:59:39 -0500 Subject: dump 2020-12-11 --- .../web/javascript/reference/global_objects/unescape/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/unescape') diff --git a/files/zh-cn/web/javascript/reference/global_objects/unescape/index.html b/files/zh-cn/web/javascript/reference/global_objects/unescape/index.html index b85895a7cd..59df2809d8 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/unescape/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/unescape/index.html @@ -9,11 +9,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/unescape

已废弃的unescape() 方法计算生成一个新的字符串,其中的十六进制转义序列将被其表示的字符替换。上述的转义序列就像{{jsxref("escape")}}里介绍的一样。因为 unescape 已经废弃,建议使用 {{jsxref("decodeURI")}}或者{{jsxref("decodeURIComponent")}} 替代本方法。

-
注意:不要使用unescape去解码URLS,使用decodeURI替代。
+
注意:不要使用unescape去解码URLS,使用decodeURIdecodeURIComponent替代。

语法

-
unescape(str)
+
unescape(str)

参数

@@ -32,7 +32,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/unescape

示例

-
unescape('abc123');     // "abc123"
+
unescape('abc123');     // "abc123"
 unescape('%E4%F6%FC');  // "äöü"
 unescape('%u0107');     // "ć"
 
-- cgit v1.2.3-54-g00ecf