📌  相关文章
📜  检查字典中是否存在单词javascript代码示例

📅  最后修改于: 2022-03-11 15:03:25.254000             🧑  作者: Mango

代码示例1
function check_if_word_exists(word) {
    const url = "https://api.wordnik.com/v4/word.json/" + word + "/definitions?limit=200&includeRelated=false&useCanonical=false&includeTags=false&api_key=a2a73e7b926c924fad7001ca3111acd55af2ffabf50eb4ae5";

    $.ajax({
        type: "GET",
        url: url
    }).done(function (result) {
        console.log("word exists");
    }).fail(function () {
        console.log("word does not exist");
    });
}