⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getday.htm

📁 javascript一些基本的用法,正规表达式,验证码.
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title><script language="javascript">
now=new Date(); //定义新对象,new具有Date的性质 
document.write(now.getYear()+"年");

document.write((now.getMonth()+1)+"月")
document.write(now.getDate()+"日")
if(now.getDay()==0){
document.write('星期日');
}
if(now.getDay()==1){
document.write('星期一');
}
if(now.getDay()==2){
document.write('星期二');
}
if(now.getDay()==3){
document.write('星期三');
}
if(now.getDay()==4){
document.write('星期四');
}
if(now.getDay()==5){
document.write('星期五');
}
if(now.getDay()==6){
document.write('星期六');
}

document.write(now.getHours()+"小时");
document.write(now.getMinutes()+"分钟");
document.write(now.getSeconds()+"秒");

  


</script>
</head>

<body>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -