if(typeof changeImg == "function"){
changeImg();
}
判断id是否存在
function exist(id){
var get_id=document.getElementById(id);
if(get_id){
alert("存在");
}else{
alert("不存在");
}
}
if(typeof changeImg == "function"){
changeImg();
}
判断id是否存在
function exist(id){
var get_id=document.getElementById(id);
if(get_id){
alert("存在");
}else{
alert("不存在");
}
}
转载于:https://my.oschina.net/kangweb/blog/1635287