The example in this article describes how JavaScript returns all key-value comparisons of the current session cookie. Share it with everyone for your reference. The details are as follows:
The following JS code outputs all cookie key value comparisons
<!DOCTYPE html>
<html>
<body>
Cookies associated with this document:
<script>
document.write(document.cookie);
</script>
</body>
</html>
Copy after login
The output results on this machine are as follows;
Cookies associated with this document: __gads=ID=88235e28adb2de90:T=1371793250:S= ALNI_MZZqvAlWhTDl1EqFEU4EKH4ZMmPlQ; ASPSESSIONIDSQQDBSSD=AIAFKJPBBOEKIJNAMAOMGJJH; ASPSESSIONIDSQQBCTSD=EPOMLBJDJBKBGKHBJMBGDDPC; PSESSIONIDQSSDASTC=EFKIBPODBGMKHIINAGPNMFCA; ASPSESSIONIDQQRBCTTC=FHFAALIBDLEDFDCFJMKIHICP; __utma=119627022.880502788.1371793248.1372301378.1372312534.8; __utmb=119627022 .4.10.1372312534; __utmc=119627022; __utmz=119627022.1371803017.3.2. utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=jb51.net
I hope this article will be helpful to everyone’s JavaScript programming design.