encodeURIComponent('https://www.baidu.com/?name=啊啊啊')
decodeURIComponent('https%3A%2F%2Fwww.baidu.com%2F%3Fname%3D%E5%95%8A%E5%95%8A%E5%95%8A')
encodeURI('https://www.baidu.com/?name=啊啊啊')
decodeURI('https://www.baidu.com/?name=%E5%95%8A%E5%95%8A%E5%95%8A')
文件夹的读写
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>Document</title></head><body><button id="btn">open</button><script>const btn = document.querySelector("#btn");btn.onclick = function () {showDirectoryPicker().then(async (result) => {console.log(result.entries().next());for await (let item of result.entries()) {console.log(item);}});};</script></body>
</html>