From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../global_objects/regexp/tosource/index.html | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 files/zh-cn/web/javascript/reference/global_objects/regexp/tosource/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/regexp/tosource') diff --git a/files/zh-cn/web/javascript/reference/global_objects/regexp/tosource/index.html b/files/zh-cn/web/javascript/reference/global_objects/regexp/tosource/index.html new file mode 100644 index 0000000000..80f4972ca0 --- /dev/null +++ b/files/zh-cn/web/javascript/reference/global_objects/regexp/tosource/index.html @@ -0,0 +1,44 @@ +--- +title: RegExp.prototype.toSource() +slug: Web/JavaScript/Reference/Global_Objects/RegExp/toSource +tags: + - JavaScript + - Method + - Non-standard + - Prototype + - RegExp +translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/toSource +--- +

{{JSRef("Global_Objects", "RegExp")}}{{ Non-standard_header() }}

+ +

概述

+ +

返回一个字符串,代表当前对象的源代码

+ +

语法

+ +
regexObj.toSource()
+
+ +

描述

+ +

toSource方法返回值如下:

+ + + +
function RegExp() {
+    [native code]
+}
+
+ + + +

该方法通常由JavaScript内部隐含调用,而不会明确的出现在用户代码中.

+ +

相关链接

+ +

Object.prototype.toSource

-- cgit v1.2.3-54-g00ecf