获取当年年月日

Original 2019-05-04 22:38:33 215
abstract:<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script> function date(){ var DA = new Date(); document.write(DA.getF

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title></title>

<script>

function date(){

var DA = new Date();

document.write(DA.getFullYear()+"年"+DA.getMonth()+"月"+DA.getDate()+"日");

}

</script>

</head>

<body>

<button onclick="date()">点击</button>

</body>

</html>


Correcting teacher:查无此人Correction time:2019-05-05 09:13:19
Teacher's summary:完成的不错。日期时间一般是php处理,js的日期时间,用在选择框。继续加油。

Release Notes

Popular Entries