提交 abcf48a2 编写于 作者: A a946547732

Wed May 29 16:02:00 CST 2024 inscode

上级 41abfb2c
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
你好2224444
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>网页</title>
</head>
<body>
你好111
</body>
</html>
\ No newline at end of file
...@@ -8,8 +8,6 @@ function 计算当前月一共有几天() { ...@@ -8,8 +8,6 @@ function 计算当前月一共有几天() {
return daysInMonth; return daysInMonth;
} }
const days = 计算当前月一共有几天();
console.log(`本月一共${days}天`); // 输出当前月份的天数
function getDayOfMonth() { function getDayOfMonth() {
const today = new Date(); const today = new Date();
...@@ -20,6 +18,12 @@ function getDayOfMonth() { ...@@ -20,6 +18,12 @@ function getDayOfMonth() {
const diffDays = Math.ceil(diffMs / (1000 * 60 * 60 * 24)); const diffDays = Math.ceil(diffMs / (1000 * 60 * 60 * 24));
return diffDays; return diffDays;
} }
console.log(`当前月份:${new Date().getMonth() + 1}`)
const days = 计算当前月一共有几天();
console.log(`本月一共${days}天`); // 输出当前月份的天数
const dayOfMonth = getDayOfMonth(); const dayOfMonth = getDayOfMonth();
console.log(`今天是本月的第 ${dayOfMonth} 天`); console.log(`今天是本月的第 ${dayOfMonth} 天`);
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "node index.js", "dev": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1" "http": "http-server -p 80"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@types/node": "^18.0.6", "@types/node": "^18.0.6",
"http-server": "^14.1.1",
"node-fetch": "^3.2.6" "node-fetch": "^3.2.6"
} }
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册