forked from mrlan/EnglishPal
Compare commits
2 Commits
master
...
Lanhui-upd
Author | SHA1 | Date |
---|---|---|
Lan Hui | d67ccf4d71 | |
Lan Hui | 9148d9a95c |
|
@ -47,7 +47,7 @@ function unfamiliar(theWord) {
|
||||||
|
|
||||||
function delete_word(theWord) {
|
function delete_word(theWord) {
|
||||||
let username = $("#username").text();
|
let username = $("#username").text();
|
||||||
let word = theWord.replace('&', '&');
|
let word = $("#word_" + theWord).text();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"GET",
|
type:"GET",
|
||||||
url:"/" + username + "/" + word + "/del",
|
url:"/" + username + "/" + word + "/del",
|
||||||
|
@ -104,7 +104,6 @@ function wordTemplate(word) {
|
||||||
*/
|
*/
|
||||||
function removeWord(word) {
|
function removeWord(word) {
|
||||||
// 根据词频信息删除元素
|
// 根据词频信息删除元素
|
||||||
word = word.replace('&', '&');
|
|
||||||
const element_to_remove = document.getElementById(`p_${word}`);
|
const element_to_remove = document.getElementById(`p_${word}`);
|
||||||
if (element_to_remove != null) {
|
if (element_to_remove != null) {
|
||||||
element_to_remove.remove();
|
element_to_remove.remove();
|
||||||
|
@ -170,4 +169,4 @@ function compareWord(first, second) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in New Issue