返回制作熟悉并制作......登陆

制作熟悉并制作一个Date案例

@夜澜风2019-04-04 17:55:30273

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Date时间</title>

</head>

<body>

<script type="text/javascript">

var mydate= new Date();

// document.write(date);

var year=document.write(mydate.getFullYear()+'年')

var month=document.write(mydate.getMonth()+'月'+'<br>')

var month=new Array(12)

month[0]="一月";

month[1]="二月";

month[2]="三月";

month[3]="四月";

month[4]="五月";

month[5]="六月";

month[6]="七月";

month[7]="八月";

month[8]="九月";

month[9]="十月";

month[10]="十一月";

month[11]="十二月";

    // document.write('这个月是'+ month[mydate.getMonth()]+'月')

document.write('这月是'+ mydate.getFullYear()+'年'+ month[mydate.getMonth()]+'星期'+ mydate.getDay()+'今天是这个月的第'+mydate.getDate()+'天'+mydate.getHours()+":"+mydate.getMinutes()+':'+mydate.getSeconds())



</script>

</body>

</html>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送