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/string/tosource/index.html | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 files/zh-cn/web/javascript/reference/global_objects/string/tosource/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/string/tosource') diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/tosource/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/tosource/index.html new file mode 100644 index 0000000000..7914776a25 --- /dev/null +++ b/files/zh-cn/web/javascript/reference/global_objects/string/tosource/index.html @@ -0,0 +1,91 @@ +--- +title: String.prototype.toSource() +slug: Web/JavaScript/Reference/Global_Objects/String/toSource +translation_of: Web/JavaScript/Reference/Global_Objects/String/toSource +--- +
{{JSRef}} {{non-standard_header}}
+ +

toSource() 方法返回一个代表对象的源代码。

+ +

语法

+ +
String.toSource()
+str.toSource()
+
+ +

描述

+ +

toSource() 方法返回以下值:

+ +

对于内建对象 {{jsxref("String")}} , toSource()返回以下值说明源码不可用:

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

对于实例{{jsxref("String")}} 或者字符串, toSource() 返回一个字符串表示源码.

+ +

这种方法通常在内部被JavaScript调用,而不是明确的代码。.

+ +

规范

+ +

不属于任何标准. 在 JavaScript 1.3实现了.

+ +

浏览器适配

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

参见

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