123456789101112131415161718 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title></title>
- </head>
- <body>
- <script>
- function encodeFunc(str) {
- let utf8Bytes = new TextEncoder().encode(str);
- let base64Str = btoa(String.fromCharCode(...utf8Bytes));
- return base64Str.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
- }
- encodeFunc('原神启动!')
- </script>
- </body>
- </html>
|