【发布时间】:2014-02-24 11:57:20
【问题描述】:
我尝试加载图像。 但每次控制台日志设置“错误”。
我的错误在哪里? 第一种方式
$('#cont').click(function() {
$.ajax({
type: "GET",
url: "http://pp.vk.me/c608129/v608129926/13d7/M78M4KmekWI.jpg",
dataType: "image/gif",
success: function(img) {
i = new Image();
i.src = img;
$(this).appned(i);
},
error: function(error, txtStatus) {
console.log(txtStatus);
console.log('error');
}
});
});
【问题讨论】:
-
append而不是appned
标签: javascript jquery