下面的代码在同一页面的底部创建图像。如何将图像显示在新的标签/窗口中而不是显示在同一页面中?
success: function (data) { var image = new Image(); image.src = "data:image/jpg;base64," + data.d; document.body.appendChild(image); }
就像是:
success: function (data) { var image = new Image(); image.src = "data:image/jpg;base64," + data.d; var w = window.open(""); w.document.write(image.outerHTML); }