开发者

How to retrieve the image in javascript

I have one url , which returns an image tag.Now i need to call this url using javascript , and embed this return under a div tag. I was trying $.get(), but "data" is returning some text.How to retrieve the image in javascript. note: pls provide sln with javascript/jq开发者_JAVA技巧uery.

Edit: data returns GIF40 or soem this kind of arbitary value..


try

$.ajax({
   method: 'get',
   url: 'image.php',
   success: function(data){
      $('#divId').append($(data).find('img')); 
  }

})
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜