我想添加一个元素到一个数组,只有当它不存在于数组中时。我曾经使用mootools的Array.include方法来做到这一点,但现在我正在使用jquery。什么是mootools Array.include()的jQuery等价物?
有没有在jQuery中做到这一点的方法?
http://mootools.net/docs/Native/Array#Array:include
我想添加一个元素到一个数组,只有当它不存在于数组中时。我曾经使用mootools的Array.include方法来做到这一点,但现在我正在使用jquery。什么是mootools Array.include()的jQuery等价物?
有没有在jQuery中做到这一点的方法?
http://mootools.net/docs/Native/Array#Array:include
这不是我真正想到的。 – leeand00 2009-02-20 19:48:48
哎呀,对不起这个,回答太快 – 2009-02-20 19:49:27