尝试这个:
$('<img/>').attr('src', 'http://picture.de/image.png').on('load', function() { $(this).remove(); // prevent memory leaks as @benweet suggested $('body').css('background-image', 'url(http://picture.de/image.png)');});这将在内存中创建新映像,并使用load事件检测何时加载src。



