📅  最后修改于: 2022-03-11 15:04:19.185000             🧑  作者: Mango
var myElement = document.getElementById("myElementID");
if(!myElement){
//#myElementID element DOES NOT exist
}
if(myElement){
//#myElementID element DOES exists
}