Refactor: use better function
parent
1d8671c5c7
commit
ecc354bc0d
|
@ -71,14 +71,13 @@ function fillInWord2() {
|
|||
cancelHighlighting();
|
||||
}
|
||||
|
||||
function ChangeHighlight() {
|
||||
function toggleHighlighting() {
|
||||
if (isHighlight) {
|
||||
isHighlight = false;
|
||||
cancelHighlighting();
|
||||
} else {
|
||||
isHighlight = true;
|
||||
highLight();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<p><b>阅读文章并回答问题</b></p>
|
||||
<div id="text-content">{{ today_article|safe }}</div>
|
||||
|
||||
<input type="checkbox" onclick="ChangeHighlight()" checked/>生词高亮
|
||||
<input type="checkbox" onclick="toggleHighlighting()" checked/>生词高亮
|
||||
<input type="checkbox" onclick="onReadClick()" checked/>大声朗读
|
||||
<input type="checkbox" onclick="onChooseClick()" checked/>划词入库
|
||||
<div class="range">
|
||||
|
|
Loading…
Reference in New Issue