直接上代码: window.onload = MyInitFunc; function MyInitFunc(){ debugger; var imgUrl = $("#img").attr("src"); console.log(imgUrl); if(document.getElementById('img').src){ alert(1); }else{ alert(2); }
}
直接上代码: window.onload = MyInitFunc; function MyInitFunc(){ debugger; var imgUrl = $("#img").attr("src"); console.log(imgUrl); if(document.getElementById('img').src){ alert(1); }else{ alert(2); }
}