Handling images from XMLHttpRequest (with HTML and Javascript)

后端 未结 4 627
面向向阳花
面向向阳花 2020-12-19 09:31

I am using an XMLHttpRequest to fetch an image from a server (run locally from a third party server-applet)

A simplified version of the code is show

4条回答
  •  被撕碎了的回忆
    2020-12-19 10:35

    You can use inline images

    on server side encode your response in base64

    in php use base64_encode("your data")
    and in javascript

    result = document.getElementById('results');
    result.innerHTML = '';
    

提交回复
热议问题