简体   繁体   中英

How to base64 a string in html

I've a text area where I'm putting in the header. In header I want to show a link. One component of the link is base64 encoded. I've tried to do this using

<a href="https://test.com/test/data:text/html;base64,(value)"></a>

You can't do this in HTML, you'll need a javascript function for base64 encoding. Check this out: http://www.webtoolkit.info/javascript-base64.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM