Posted in Javascript onApril 03, 2015
本文实例讲述了JavaScript返回当前会话cookie全部键值对照的方法。分享给大家供大家参考。具体如下:
下面的JS代码输出全部的cookie键值对照
<!DOCTYPE html> <html> <body> Cookies associated with this document: <script> document.write(document.cookie); </script> </body> </html>
在本机上输出结果如下;
Cookies associated with this document: __gads=ID=88235e28adb2de90:T=1371793250:S=ALNI_MZZqvAlWhTDl1EqFEU4EKH4ZMmPlQ; ASPSESSIONIDSQQDBSSD=AIAFKJPBBOEKIJNAMAOMGJJH; ASPSESSIONIDSQQBCTSD=EPOMLBJDJBKBGKHBJMBGDDPC; __qca=P0-1744690351-1372043640630; ASPSESSIONIDQSSDASTC=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=3water.com
希望本文所述对大家的javascript程序设计有所帮助。
JavaScript返回当前会话cookie全部键值对照的方法
- Author -
疯狂一夏声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@