2
看起来像一个简单的事情,但我无法找到它的任何东西!jQuery数组中的元素总数
var cookie = [1,2,3],
total = cookie.magicMethodThatICantFindThatTotalsTheElements();
total = 3
看起来像一个简单的事情,但我无法找到它的任何东西!jQuery数组中的元素总数
var cookie = [1,2,3],
total = cookie.magicMethodThatICantFindThatTotalsTheElements();
total = 3
物业length
指定的元素数量在数组:
var total = cookie.length;
...咄!我的错 – technopeasant