diff --git a/app/static/js/fillword.js b/app/static/js/fillword.js index b967633..57521a7 100644 --- a/app/static/js/fillword.js +++ b/app/static/js/fillword.js @@ -29,3 +29,6 @@ function onReadClick() { function onChooseClick() { isChoose = !isChoose; } +if (performance.navigation.type == 1) { //如果网页刷新,停止播放声音 + stopRead() +} \ No newline at end of file diff --git a/app/templates/userpage_get.html b/app/templates/userpage_get.html index 68997ef..e503f0b 100644 --- a/app/templates/userpage_get.html +++ b/app/templates/userpage_get.html @@ -49,8 +49,8 @@ {# <div class="alert alert-warning" role="alert">Congratulations! {{ message }}</div>#} {# {% endfor %}#} - <button class="btn btn-success" id="load_next_article" onclick="load_next_article()"> 下一篇 Next Article </button> - <button class="btn btn-success" id="load_pre_article" onclick="load_pre_article()" > 上一篇 Previous Article </button> + <button class="btn btn-success" id="load_next_article" onclick="load_next_article();stopRead()"> 下一篇 Next Article </button> + <button class="btn btn-success" id="load_pre_article" onclick="load_pre_article();stopRead()" > 上一篇 Previous Article </button> <p><b>阅读文章并回答问题</b></p> <div id="text-content"> @@ -97,7 +97,7 @@ <p><b>收集生词吧</b> (可以在正文中划词,也可以复制黏贴)</p> <form method="post" action="/{{ username }}/userpage"> <textarea name="content" id="selected-words" rows="10" cols="120"></textarea><br/> - <input type="submit" value="把生词加入我的生词库"/> + <input type="submit" value="把生词加入我的生词库" onclick="stopRead()"/> <input type="reset" value="清除"/> </form> {% if session.get['thisWord'] %}