aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/date/tojson
diff options
context:
space:
mode:
authort7yang <t7yang@gmail.com>2022-01-10 08:38:07 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commitc40612041809fe289aba58aefa170bbe784aba1f (patch)
tree8ca89b071d04afcf7abd6d9a04d0765a041d9c8a /files/zh-cn/web/javascript/reference/global_objects/date/tojson
parent12a899ab8540bc84f56a0dc6491be80a48499d49 (diff)
downloadtranslated-content-c40612041809fe289aba58aefa170bbe784aba1f.tar.gz
translated-content-c40612041809fe289aba58aefa170bbe784aba1f.tar.bz2
translated-content-c40612041809fe289aba58aefa170bbe784aba1f.zip
remove name attribute for zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/date/tojson')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/tojson/index.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/tojson/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/tojson/index.html
index 91bc392260..917a1b4ffb 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/tojson/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/tojson/index.html
@@ -11,18 +11,18 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/toJSON
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><var>dateObj</var>.toJSON()</code>
</pre>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>{{jsxref("Date")}} 实例引用一个具体的时间点。 调用 <code>toJSON()</code> 返回一个 JSON 格式字符串(使用 {{jsxref("Date.prototype.toISOString()", "toISOString()")}}),表示该日期对象的值。默认情况下,这个方法常用于 {{Glossary("JSON")}}序列化{{jsxref("Date")}}对象。</p>
-<h2 id="Example" name="Example">样例</h2>
+<h2 id="Example">样例</h2>
-<h3 id="Example:_Using_toJSON" name="Example:_Using_toJSON"><code>toJSON()</code> 样例</h3>
+<h3 id="Example:_Using_toJSON"><code>toJSON()</code> 样例</h3>
<pre class="brush:js">var date = new Date();
console.log(date); //Thu Nov 09 2017 18:54:04 GMT+0800 (中国标准时间)