转载自 https://blog.csdn.net/lpandeng/article/details/78455907
if(document.getElementById("id")){
alert('对象存在'); ... ...
} else{
alert('对象不存在'); ... ...
}
转载自 https://blog.csdn.net/lpandeng/article/details/78455907
if(document.getElementById("id")){
alert('对象存在'); ... ...
} else{
alert('对象不存在'); ... ...
}