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.
我有 javascript 代码: var win = ("data:image/svg xml;base64," Utils.encode64(svg)); 在 HTML5 中。我想把它转换成数据:image/png;base64,.....
我试过 win= win.replace('data:image/png;base64,',''); 但是将xml替换为png,但它不能正确显示图像并给出错误消息。
请帮忙。。