From 85a3a9ce6a2469ab710e0a3db5c400da5a578f58 Mon Sep 17 00:00:00 2001 From: "1994836463@qq.com" Date: Sun, 26 May 2024 11:19:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=99=E9=87=8C=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=86=99=E5=A4=9A=E4=BD=99=E4=BA=86=EF=BC=8C=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=BA=86=E4=B8=80=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/js/fillword.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/static/js/fillword.js b/app/static/js/fillword.js index 2751a6a..421d972 100644 --- a/app/static/js/fillword.js +++ b/app/static/js/fillword.js @@ -10,12 +10,9 @@ function fillInWord() { if (isRead) Reader.read(word, inputSlider.value); if (!isChoose) return; const element = document.getElementById("selected-words"); - let index = (String)(element.value).indexOf(word); - localStorage.setItem("nowWord",element.value); + localStorage.setItem('nowWords', element.value); + element.value = element.value + " " + word; localStorage.setItem('selectedWords', element.value); - if(index === -1){ - element.value = element.value + " " + word; - } } document.getElementById("text-content").addEventListener("click", fillInWord, false);