Compare commits
No commits in common. "09beaff8313fac605485197fc4d77333243fda11" and "98027158b593c4d110dd9ec8f60da1d8a6e598ec" have entirely different histories.
09beaff831
...
98027158b5
|
@ -172,24 +172,3 @@ function compareWord(first, second) {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 生词csv导出 */
|
||||
function exportToCSV() {
|
||||
let csvContent = "data:text/csv;charset=utf-8,Word,Frequency\n";
|
||||
let rows = document.querySelectorAll(".new-word");
|
||||
|
||||
rows.forEach(row => {
|
||||
let word = row.querySelector("a.btn-light").innerText;
|
||||
let freq = row.querySelector("a[title]").innerText;
|
||||
csvContent += word + "," + freq + "\n";
|
||||
});
|
||||
|
||||
let encodedUri = encodeURI(csvContent);
|
||||
let link = document.createElement("a");
|
||||
link.setAttribute("href", encodedUri);
|
||||
link.setAttribute("download", "word_list.csv");
|
||||
document.body.appendChild(link);
|
||||
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
}
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
@ -152,8 +152,6 @@
|
|||
允许动态调整顺序
|
||||
</label>
|
||||
</p>
|
||||
<!--添加导出按钮-->
|
||||
<button class="btn btn-primary" onclick="exportToCSV()">导出</button>
|
||||
<a name="aaa"></a>
|
||||
<div class="word-container">
|
||||
{% for x in lst3 %}
|
||||
|
@ -173,7 +171,6 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
<input id="selected-words2" type="hidden" value="{{ words }}">
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ yml['footer'] | safe }}
|
||||
|
|
Loading…
Reference in New Issue