$("#demoImg").attr("src", "demo.jpg").load(function() { alert("图片加载完成"); });