diff --git a/annotation.py b/annotation.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/static/js/word_operation.js b/app/static/js/word_operation.js index dcf38ff..b4d466c 100644 --- a/app/static/js/word_operation.js +++ b/app/static/js/word_operation.js @@ -56,7 +56,8 @@ function delete_word(theWord) { removeWord(theWord); } else { $("#p_" + theWord).remove(); - } + } + } }); } @@ -116,6 +117,7 @@ function removeWord(word) { if (element_to_remove !== null) { element_to_remove.remove(); } + page_reload(); } function renderWord(word) { @@ -171,4 +173,8 @@ function compareWord(first, second) { return first.word < second.word ? -1 : 1; } return 0; +} +//通过在单词本删除单词后加入刷新页面功能,可以使文本高亮实时取消 +function page_reload(){ + location.reload(); } \ No newline at end of file diff --git a/app/templates/userpage_get.html b/app/templates/userpage_get.html index e5c8d95..8f66ce1 100644 --- a/app/templates/userpage_get.html +++ b/app/templates/userpage_get.html @@ -124,7 +124,7 @@
{% if session.get['thisWord'] %}