if(document.getElementById("id")){
alert('对象存在');
... ...
}
else{
alert('对象不存在');
... ...
}
参考传送门:https://segmentfault.com/q/1010000011586519
if(document.getElementById("id")){
alert('对象存在');
... ...
}
else{
alert('对象不存在');
... ...
}
参考传送门:https://segmentfault.com/q/1010000011586519

被折叠的 条评论
为什么被折叠?