js-cookie的使用

    xiaoxiao2021-03-25  103

    1.js-cookie的赋值

    <!DOCTYPE html> <html> <head> <title></title> <meta charset="utf-8"> </head> <script type="text/javascript"> document.cookie="user="+encodeURIComponent('小张'); alert(decodeURIComponent(document.cookie)); //解决传输乱码问题 </script> <body> </body> </html>
    转载请注明原文地址: https://ju.6miu.com/read-5318.html

    最新回复(0)