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/sethours/index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html') diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html index 43786dadd9..a5708b4fd6 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html @@ -11,16 +11,16 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/setHours -

语法

+

语法

dateObj.setHours(hoursValue[, minutesValue[, secondsValue[, msValue]]])
 
-

JavaScript 1.3版本之前

+

JavaScript 1.3版本之前

dateObj.setHours(hoursValue) 
-

参数

+

参数

hoursValue
@@ -33,15 +33,15 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/setHours
一个 0 到 999 的数字,表示微秒数,如果指定了 msValue 参数,则必须同时指定 minutesValue 和 secondsValue 参数。
-

描述

+

描述

如果不指定 minutesValuesecondsValue 和 msValue 参数,则会使用{{jsxref("Date.getMinutes", "getMinutes()")}},{{jsxref("Date.getSeconds", "getSeconds()")}} 和{{jsxref("Date.getMilliseconds", "getMilliseconds()")}} 方法的返回值。

如果有一个参数超出了合理范围,setHours 会相应地更新日期对象中的日期信息。例如,如果为 secondsValue 指定了 100,则分钟会加 1,然后秒数使用 40。

-

例子

+

例子

-

例子:使用setHours方法

+

例子:使用setHours方法

var theBigDay = new Date();
 theBigDay.setHours(7);
@@ -78,7 +78,7 @@ theBigDay.setHours(7);
 
 

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

-

相关链接

+

相关链接