可能重复:
jQuery Ajax 等到所有图像都加载完毕
//var imgURL="http://xxxx.xxx:8084/xxx/largedynamicimagethattakestime
FB.api(
'/me/photos',
'post',
{
message:' coffee',
url: imgURL
},
function(response) {
if (!response || response.error) {
alert('Error occured'+response.error);
}
else {
//...........
}
}
);
我只想在完成加载后启动此fb.api
调用。var imgURL
有什么方法可以让我在 a 中加载此图像并仅在图像完全加载时div
调用?fb.api
也欢迎提供带有图像的按钮来发布此图像。