判断方法:1、使用“document.getElementById("id值")”语句根据指定id值获取div元素对象;2、利用if语句判断div是否存在,语法“if (div元素对象){元素存在}else{元素