-3

I have this code and the image does not load to the selected div

base = "www.samplee/someimage.jpg";
var img = "<img src='"+base+"' />";

imgpreview.load(ul,function(){
            loader.text('mana');
            console.log(imgfield);
}); 

what's wrong with my code?

4

1 回答 1

0

那么,什么是imgpreview?它没有定义。试试这个:

img.load("/ ul", function() { // Your code in here... });

如果您需要将其加载到div元素中,那imgpreview应该代表什么?div 元素?div如果是这样,那是元素的类还是 id ?

于 2013-08-13T01:57:00.220 回答