Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个返回 png 图像字节数组的服务,我想在我的 jsp 页面上呈现它。我正在进行ajax调用以获取图像。
$.ajax({ type: "GET", cache: false, async: false, url: '<spring:url value="/service/org/flk/2"/>', success: function(msg) {
您将需要流式传输 base64 编码数据作为响应,然后您可以这样做
$("#someDivId").html('<img src="data:image/png;base64,'+response + '"/>');
responsebase64编码的图像数据在哪里
response