From 0f17469de2f23d1afbd64653dabafc60668aaa26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E6=AF=94=E4=BC=A6?= <1531071679@qq.com> Date: Thu, 21 Nov 2024 13:59:30 +0800 Subject: [PATCH 1/4] test --- .../20241118\346\273\232\350\275\256/.idea/.gitignore" | 8 ++++++++ .../.idea/20241118\346\273\232\350\275\256.iml" | 9 +++++++++ .../20241118\346\273\232\350\275\256/.idea/misc.xml" | 9 +++++++++ .../20241118\346\273\232\350\275\256/.idea/modules.xml" | 8 ++++++++ .../20241118\346\273\232\350\275\256/.idea/vcs.xml" | 6 ++++++ ...347\224\265\346\242\257\345\257\274\350\210\252.html" | 4 +--- 6 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 "\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/.gitignore" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/20241118\346\273\232\350\275\256.iml" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/misc.xml" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/modules.xml" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/vcs.xml" diff --git "a/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/.gitignore" "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/.gitignore" new file mode 100644 index 0000000..35410ca --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/.gitignore" @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git "a/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/20241118\346\273\232\350\275\256.iml" "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/20241118\346\273\232\350\275\256.iml" new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/20241118\346\273\232\350\275\256.iml" @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/misc.xml" "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/misc.xml" new file mode 100644 index 0000000..b73c650 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/misc.xml" @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/modules.xml" "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/modules.xml" new file mode 100644 index 0000000..e8eaedf --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/modules.xml" @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/vcs.xml" "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/vcs.xml" new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/.idea/vcs.xml" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/\347\224\265\346\242\257\345\257\274\350\210\252\347\264\240\346\235\220/\347\224\265\346\242\257\345\257\274\350\210\252.html" "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/\347\224\265\346\242\257\345\257\274\350\210\252\347\264\240\346\235\220/\347\224\265\346\242\257\345\257\274\350\210\252.html" index b336224..0a757c7 100644 --- "a/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/\347\224\265\346\242\257\345\257\274\350\210\252\347\264\240\346\235\220/\347\224\265\346\242\257\345\257\274\350\210\252.html" +++ "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/\347\224\265\346\242\257\345\257\274\350\210\252\347\264\240\346\235\220/\347\224\265\346\242\257\345\257\274\350\210\252.html" @@ -1235,10 +1235,9 @@ }) const list = document.querySelector('.xtx-elevator-list') list.addEventListener('click', function (e) { - console.log(e.target) const old = document.querySelector('.xtx-elevator-list.active') if (old) old.classList.remove('active'); - if (e.target.tagName === 'A') { + if (e.target.tagName === 'A'&& e.target.dataset.name) { e.target.classList.add('active') const top = document.querySelector(`.xtx_goods_${e.target.dataset.name}`).offsetTop; document.documentElement.scrollTop = top; @@ -1256,7 +1255,6 @@ const n = document.documentElement.scrollTop; if (n >= news.offsetTop && n < popular.offsetTop) { document.querySelector('[data-name="new"]').classList.add('active') - console.log(777 ) } else if (n >= popular.offsetTop && n < brand.offsetTop) { document.querySelector('[data-name="popular"]').classList.add('active') } else if (n >= brand.offsetTop && n < topic.offsetTop) { -- Gitee From 7308d75508607cbf62db29b2e39ddbdb5d7115d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E6=AF=94=E4=BC=A6?= <1531071679@qq.com> Date: Thu, 21 Nov 2024 14:11:08 +0800 Subject: [PATCH 2/4] test --- .../\347\224\265\346\242\257\345\257\274\350\210\252.html" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/\347\224\265\346\242\257\345\257\274\350\210\252\347\264\240\346\235\220/\347\224\265\346\242\257\345\257\274\350\210\252.html" "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/\347\224\265\346\242\257\345\257\274\350\210\252\347\264\240\346\235\220/\347\224\265\346\242\257\345\257\274\350\210\252.html" index 0a757c7..1ed064d 100644 --- "a/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/\347\224\265\346\242\257\345\257\274\350\210\252\347\264\240\346\235\220/\347\224\265\346\242\257\345\257\274\350\210\252.html" +++ "b/\345\215\242\346\257\224\344\274\246/20241118\346\273\232\350\275\256/\347\224\265\346\242\257\345\257\274\350\210\252\347\264\240\346\235\220/\347\224\265\346\242\257\345\257\274\350\210\252.html" @@ -1235,7 +1235,7 @@ }) const list = document.querySelector('.xtx-elevator-list') list.addEventListener('click', function (e) { - const old = document.querySelector('.xtx-elevator-list.active') + const old = document.querySelector('.xtx-elevator-list .active') if (old) old.classList.remove('active'); if (e.target.tagName === 'A'&& e.target.dataset.name) { e.target.classList.add('active') -- Gitee From d1fde3743d339efb221b5474964ca1bb1fc15004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E6=AF=94=E4=BC=A6?= <1531071679@qq.com> Date: Thu, 21 Nov 2024 17:23:05 +0800 Subject: [PATCH 3/4] test --- .../.idea/.gitignore" | 8 ++ .../.idea/misc.xml" | 6 + .../.idea/modules.xml" | 8 ++ ...1\350\261\241\347\273\203\344\271\240.iml" | 9 ++ ...\346\234\237\345\257\271\350\261\241.html" | 28 ++++ ...\350\261\241\346\226\271\346\263\225.html" | 39 ++++++ ...\347\232\204\346\227\266\351\227\264.html" | 33 +++++ ...\344\270\252\345\206\231\346\263\225.html" | 48 +++++++ ...\346\227\266\351\227\264\346\210\263.html" | 31 +++++ ...\345\200\222\350\256\241\346\227\266.html" | 129 ++++++++++++++++++ .../teacher.html" | 41 ++++++ 11 files changed, 380 insertions(+) create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/.gitignore" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/misc.xml" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/modules.xml" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240.iml" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/01-\345\256\236\344\276\213\345\214\226\346\227\245\346\234\237\345\257\271\350\261\241.html" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/02-\345\270\270\350\247\201\347\232\204\346\227\245\346\234\237\345\257\271\350\261\241\346\226\271\346\263\225.html" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/03-\346\230\276\347\244\272\346\240\274\345\274\217\345\214\226\347\232\204\346\227\266\351\227\264.html" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/04-\346\227\266\351\227\264\347\232\204\345\217\246\345\244\226\344\270\200\344\270\252\345\206\231\346\263\225.html" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/05-\345\276\227\345\210\260\346\227\266\351\227\264\346\210\263.html" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/06-\345\200\222\350\256\241\346\227\266.html" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/teacher.html" diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/.gitignore" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/.gitignore" new file mode 100644 index 0000000..35410ca --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/.gitignore" @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/misc.xml" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/misc.xml" new file mode 100644 index 0000000..639900d --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/misc.xml" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/modules.xml" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/modules.xml" new file mode 100644 index 0000000..4e3a86d --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/modules.xml" @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240.iml" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240.iml" new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/.idea/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240.iml" @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/01-\345\256\236\344\276\213\345\214\226\346\227\245\346\234\237\345\257\271\350\261\241.html" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/01-\345\256\236\344\276\213\345\214\226\346\227\245\346\234\237\345\257\271\350\261\241.html" new file mode 100644 index 0000000..52fd438 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/01-\345\256\236\344\276\213\345\214\226\346\227\245\346\234\237\345\257\271\350\261\241.html" @@ -0,0 +1,28 @@ + + + + + + + + Document + + + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/02-\345\270\270\350\247\201\347\232\204\346\227\245\346\234\237\345\257\271\350\261\241\346\226\271\346\263\225.html" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/02-\345\270\270\350\247\201\347\232\204\346\227\245\346\234\237\345\257\271\350\261\241\346\226\271\346\263\225.html" new file mode 100644 index 0000000..b0aeb88 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/02-\345\270\270\350\247\201\347\232\204\346\227\245\346\234\237\345\257\271\350\261\241\346\226\271\346\263\225.html" @@ -0,0 +1,39 @@ + + + + + + + + Document + + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/03-\346\230\276\347\244\272\346\240\274\345\274\217\345\214\226\347\232\204\346\227\266\351\227\264.html" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/03-\346\230\276\347\244\272\346\240\274\345\274\217\345\214\226\347\232\204\346\227\266\351\227\264.html" new file mode 100644 index 0000000..851d638 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/03-\346\230\276\347\244\272\346\240\274\345\274\217\345\214\226\347\232\204\346\227\266\351\227\264.html" @@ -0,0 +1,33 @@ + + + + + + + + Document + + + + +
+ + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/04-\346\227\266\351\227\264\347\232\204\345\217\246\345\244\226\344\270\200\344\270\252\345\206\231\346\263\225.html" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/04-\346\227\266\351\227\264\347\232\204\345\217\246\345\244\226\344\270\200\344\270\252\345\206\231\346\263\225.html" new file mode 100644 index 0000000..cad1ed9 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/04-\346\227\266\351\227\264\347\232\204\345\217\246\345\244\226\344\270\200\344\270\252\345\206\231\346\263\225.html" @@ -0,0 +1,48 @@ + + + + + + + + Document + + + + +
+ + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/05-\345\276\227\345\210\260\346\227\266\351\227\264\346\210\263.html" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/05-\345\276\227\345\210\260\346\227\266\351\227\264\346\210\263.html" new file mode 100644 index 0000000..7350185 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/05-\345\276\227\345\210\260\346\227\266\351\227\264\346\210\263.html" @@ -0,0 +1,31 @@ + + + + + + + + Document + + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/06-\345\200\222\350\256\241\346\227\266.html" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/06-\345\200\222\350\256\241\346\227\266.html" new file mode 100644 index 0000000..d138ce0 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/06-\345\200\222\350\256\241\346\227\266.html" @@ -0,0 +1,129 @@ + + + + + + + + + Document + + + + +
+

今天是11月21日星期六

+

下课倒计时

+

+ 00 + : + 25 + : + 20 +

+

11:40:00下课

+
+ + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/teacher.html" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/teacher.html" new file mode 100644 index 0000000..e35acae --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/teacher.html" @@ -0,0 +1,41 @@ + + + + + Title + + +// 随机颜色函数 +// 1. 自定义一个随机颜色函数 #00FF00 rgb(255,255,255) +// a.style.color = '#FFFF00' // 三原色 Red Green Blue 0-F 的6位数 +// a.style.color = 'rgb(255,0,0)' // 三原色 Red Green Blue rgb(255,0,0) 0-255 +const div = document.querySelector('.countdown') +// div.style.backgroundColor = 'rgb(0,0,255)' +// div.style.backgroundColor = '#FF0000' + +function randomColor(flag = true) { +if (flag) { +let str = '#' // 每次随机得到的数值拼到str后面 +// 定义数组,把可选值写到数组,再去用随机的下标取6次数组的值 +const colors = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'] +// F #F 0 #F0 +for (let i = 0; i < 6; i++) { // i 这边是次数 6次 +const n = Math.floor(Math.random() * colors.length); // 随机得到一个数组的下标 +str = str + colors[n] + +} +// console.log(str); +return str; +} else { +const r = Math.floor(Math.random() * 256) +const g = Math.floor(Math.random() * 256) +const b = Math.floor(Math.random() * 256) +return `rgb(${r},${g},${b})` +} + +} + +console.log(randomColor()); + + + \ No newline at end of file -- Gitee From 512f620b0787094456d255c4b1c2e9c78421198d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E6=AF=94=E4=BC=A6?= <1531071679@qq.com> Date: Thu, 21 Nov 2024 17:27:33 +0800 Subject: [PATCH 4/4] test --- .../.idea/.gitignore" | 8 ++++++++ ...\346\227\266\351\227\264\345\257\271\350\261\241.iml" | 9 +++++++++ .../.idea/misc.xml" | 9 +++++++++ .../.idea/modules.xml" | 8 ++++++++ .../.idea/vcs.xml" | 6 ++++++ .../06-\345\200\222\350\256\241\346\227\266.html" | 1 + 6 files changed, 41 insertions(+) create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/.gitignore" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/20241121\346\227\266\351\227\264\345\257\271\350\261\241.iml" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/misc.xml" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/modules.xml" create mode 100644 "\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/vcs.xml" diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/.gitignore" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/.gitignore" new file mode 100644 index 0000000..35410ca --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/.gitignore" @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/20241121\346\227\266\351\227\264\345\257\271\350\261\241.iml" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/20241121\346\227\266\351\227\264\345\257\271\350\261\241.iml" new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/20241121\346\227\266\351\227\264\345\257\271\350\261\241.iml" @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/misc.xml" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/misc.xml" new file mode 100644 index 0000000..b73c650 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/misc.xml" @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/modules.xml" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/modules.xml" new file mode 100644 index 0000000..c84ee81 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/modules.xml" @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/vcs.xml" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/vcs.xml" new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/.idea/vcs.xml" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/06-\345\200\222\350\256\241\346\227\266.html" "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/06-\345\200\222\350\256\241\346\227\266.html" index d138ce0..9a6d2a2 100644 --- "a/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/06-\345\200\222\350\256\241\346\227\266.html" +++ "b/\345\215\242\346\257\224\344\274\246/20241121\346\227\266\351\227\264\345\257\271\350\261\241/\346\227\266\351\227\264\345\257\271\350\261\241\347\273\203\344\271\240/06-\345\200\222\350\256\241\346\227\266.html" @@ -117,6 +117,7 @@ span.innerHTML=weekday[date.getDay()] } setInterval(getCountTime,1000) + getCountTime() // 让倒计时生效 -- Gitee