亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

日期對(duì)象案例

Original 2019-04-27 15:03:17 140
abstract:通過(guò)new Date()將當(dāng)前時(shí)間信息賦值給變量,然后通過(guò)各種get...方法取得具體時(shí)間日期<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewpo

通過(guò)new Date()將當(dāng)前時(shí)間信息賦值給變量,然后通過(guò)各種get...方法取得具體時(shí)間日期

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>document</title>
</head>
<body>
<script>
var today = new Date();
console.log(today.getFullYear() + '年');
var month = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
console.log(month[today.getMonth()]);
console.log(today.getDay()+'號(hào)');
console.log(today.getHours()+'點(diǎn)');
console.log(today.getMinutes() + '分');
console.log(today.getSeconds() + '秒');
</script>
</body>
</html>


Correcting teacher:查無(wú)此人Correction time:2019-04-27 17:35:58
Teacher's summary:完成的不錯(cuò)。js的時(shí)間一般是在日期時(shí)間選擇框。繼續(xù)加油。

Release Notes

Popular Entries