赞
踩
- <script>
- /*获取cookie的值*/
- const cookie =name=>`;${document.cookie}`.split(`; ${name}=`).pop().split(';').shift();
- console.log(cookie('BMAP_SECKEY2'));
- /*清除全部cookie*/
- const clearCookies = document.cookie.split(';').
- forEach(cookie => document.cookie = cookie.replace(/^ +/, '').
- replace(/=.*/, `=;expires=${new Date(0).toUTCString()};path=/`));
- </script>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。