📅  最后修改于: 2022-03-11 15:01:45.196000             🧑  作者: Mango
// check if divId contains the word 'word' in innertext
if (document.getElementById('divId').innerHTML.indexOf("word") != -1) {
// do something
}