js----Date
来源:互联网 发布:网络超市好开吗 编辑:程序博客网 时间:2024/05/17 05:08
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
/*
日期对象:(Date)
*/
var date=new Date();
document.write("年"+date.getFullYear()+"<br/>");
document.write("月:"+(date.getMonth()+1)+"<br/>");
document.write("日:"+date.getDate()+"<br/>")
document.write("时:"+date.getHours()+"<br/>");
document.write("分:"+date.getMinutes()+"<br/>");
document.write("秒:"+date.getSeconds()+"<br/>");
document.write("当前时间是:"+date.toLocaleString()+"<br/>")
document.write("当前时间是:"+date.getFullYear()+"年"+date.getMonth()+"月"+date.getDate()
+"日 "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds()+"<br/>")
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Date对象</title>
</head>
<body>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
/*
日期对象:(Date)
*/
var date=new Date();
document.write("年"+date.getFullYear()+"<br/>");
document.write("月:"+(date.getMonth()+1)+"<br/>");
document.write("日:"+date.getDate()+"<br/>")
document.write("时:"+date.getHours()+"<br/>");
document.write("分:"+date.getMinutes()+"<br/>");
document.write("秒:"+date.getSeconds()+"<br/>");
document.write("当前时间是:"+date.toLocaleString()+"<br/>")
document.write("当前时间是:"+date.getFullYear()+"年"+date.getMonth()+"月"+date.getDate()
+"日 "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds()+"<br/>")
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Date对象</title>
</head>
<body>
</body>
</html>
0 0
- js date
- js Date
- js Date
- js date
- js date
- Js Date
- js Date
- js Date
- JS Date
- js Date
- js Date
- js.Date
- js----Date
- js Date
- <Js>Date
- js date
- js Date
- js Date
- 1038 统计同成绩学生PAT
- Java并发编程:volatile关键字解析
- cookie的弊端
- apt-get命令
- HDU 1034 分糖果 (模拟题)
- js----Date
- 创建React Native 离线 APP的过程
- 登陆拦截 filter() , 字符编码拦截器
- 正则表达式-前后查找
- 出现“MSCOMCTL.OCX或其附件之一不能正确使用:一个文件丢失或无效或'comctl32.ocx'其附件之一不能正确使用:一个文件丢失或无效”的提示的解决办法
- mysql insert操作
- 3GPP 36211-c70-8(内容不太懂)
- 多少个1?(位运算)
- 10011---JavaScript--typeof,null,undefined