我想将我的图像显示到 imageContainer 中,但我不能用我的代码来实现。这是我的代码:
document.getElementById("imageContainer").innerHTML='<img src="'+data[3].pic+' " class= "imgbig">';
我试过类似的方法,但没有用。
$(document.getElementById("imageContainer").innerHTML='<img src="'+data[3].pic+' " class= "imgbig">').fadeIn("slow");
我该如何实现?
最佳答案
尝试使用 .appendTo()
来取回追加的对象,
$('<img>', {'src': data[3].pic, 'class' : 'imgbig'})
.appendTo("#imageContainer")
.hide().fadeIn("slow");
关于javascript - 如何将我的图像淡入容器中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28061128/