JavaScript 11
972 ワード
<!DOCTYPE html>
<html>
<head>
<title>Javascript 11</title>
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<script type="text/javascript">
/*
* js 。 Date
*/
var date = new Date();
with (date) {
var year = getFullYear();
var month = getMonth() + 1;
var day = getDate();
var week = getWeek(getDay());
document.write(year + "-----" + month + "-----" + day + "-----" + week);
}
function getWeek(num) {
var weeks = [ ' ', ' ', ' ', ' ', ' ', ' ', ' ' ];
return weeks[num];
}
</script>
</body>
</html>