From c40612041809fe289aba58aefa170bbe784aba1f Mon Sep 17 00:00:00 2001 From: t7yang Date: Mon, 10 Jan 2022 08:38:07 +0800 Subject: remove name attribute for zh-CN --- .../reference/global_objects/date/setdate/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/date/setdate/index.html') diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/setdate/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/setdate/index.html index c2a3e5a5c5..9cbddc4177 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/date/setdate/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/date/setdate/index.html @@ -11,18 +11,18 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/setDate -

语法

+

语法

dateObj.setDate(dayValue)
-

参数

+

参数

dayValue
一个整数,表示该月的第几天。
-

描述

+

描述

如果 dayValue 超出了月份的合理范围,setDate 将会相应地更新 Date 对象。

@@ -30,9 +30,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/setDate

如果dayValue被设置为负数,日期会设置为上个月最后一天往前数这个负数绝对值天数后的日期。-1会设置为上月最后一天的前一天(译者注:例如当前为4月,如果setDate(-2),则为3月29日)

-

例子

+

例子

-

例子:使用setDate方法

+

例子:使用setDate方法

var theBigDay = new Date(1962, 6, 7); // 1962-07-07
 theBigDay.setDate(24);  // 1962-07-24
@@ -69,7 +69,7 @@ theBigDay.setDate(32);  // 1962-08-01

{{Compat("javascript.builtins.Date.setDate")}}

-

相关链接

+

相关链接