我创建了一个document.location的jQuery对象,然后使用attr函数获取搜索属性,以获取所有变量。但是,当我对它使用split函数时,在使用each()之后,它会给出错误,说明该对象没有each方法。TypeError: Object [object Array] has no method 'each' $(document.location).attr('search').s
当使用新的键/值对更新数组时,会更新cookie,它将数组存储为JSON对象。我使用jQuery.cookie('day', JSON.stringify(timeArr), {expires: 7});将JSON对象存储在cookie中,它以以下格式存储数组(从console.log我尝试了几个不同的循环,即for(var k in cookieValue){}和jQuery.each