var cache = {}; $.data(cache,'key','value'); //缓存数据 //获取数据 $.data(cache,'key'); 转载于:https://www.cnblogs.com/milantaotao/p/6677366.html