Skip to content

Function: getItem() ​

ts
function getItem(key: string): string

根据key值获取cookie数据

Example ​

ts
getItem('test');

Parameters ​

ParameterTypeDescription

key

string

key值

Returns ​

string

Cookie中key值为key的值