From 871d4095b07cedacb7fbef4c38d64982f539c404 Mon Sep 17 00:00:00 2001 From: fei.wang <wf18701153496@163.com> Date: 星期四, 09 五月 2024 15:40:15 +0800 Subject: [PATCH] 测试提交 --- src/webapp/js/Login/script.js | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/webapp/js/Login/script.js b/src/webapp/js/Login/script.js new file mode 100644 index 0000000..21d9010 --- /dev/null +++ b/src/webapp/js/Login/script.js @@ -0,0 +1,17 @@ +function addcl() { + let parent = this.parentNode.parentNode; + parent.classList.add("focus"); +} + +function remcl() { + let parent = this.parentNode.parentNode; + if (this.value == "") { + parent.classList.remove("focus"); + } +} + + +inputs.forEach(input => { + input.addEventListener("focus", addcl); + input.addEventListener("blur", remcl); +}); \ No newline at end of file -- Gitblit v1.9.3