MsAjax Lib-> Array.remove 函数
来源:互联网 发布:过山车之星优化 编辑:程序博客网 时间:2024/05/01 12:01
Array.remove 函数
从 Array 中移除特定对象的第一个匹配项。 静态函数,使用无需实例化。
语法
var isRemoved = Array.remove(array, item);
参数
- array
准备移除的项目的数组.
- item
要从 Array 移除的项目。
返回值
移除的项目存在并成功删除则返回true ; 否则返回 false.
备注
使用 remove 从 array中移除项目.项目索引自动减1.
在Firefox浏览器中,调用remove时item 参数设置为 undefined 则移除第一个值为undefined的项目. 其它浏览器中,使用undefined值的item参数则没有效果.
下面的这示例展示了 remove 的使用方法.
JavaScript
var a = ['a', 'b', 'c', 'd', 'e'];
Array.remove(a, 'c');
// 结果返回: "a,b,d,e"
document.write(a,"</p>");
Array.removeAt(a, 2);
// 结果返回//View the results: "a,b,e"
document.write(a,"</p>");
请参见
- Array.dequeue 函数
- Array 对象
- Array 类型扩展
- JScript Language Reference
- MsAjax Lib-> Array.remove 函数
- MsAjax Lib-> Array.enqueue 函数
- MsAjax Lib-> Array.dequeue 函数
- MsAjax Lib-> Array.forEach 函数
- MsAjax Lib-> Array.indexOf 函数
- MsAjax Lib-> Array.insert 函数
- MsAjax Lib-> Array.parse 函数
- MsAjax Lib-> Array.removeAt 函数
- MsAjax Lib-> Boolean.parse 函数
- MsAjax Lib-> Date.format 函数
- MsAjax Lib-> Date.localeFormat 函数
- MsAjax Lib-> Date.parseLocale 函数
- MsAjax Lib-> Date.parseInvariant 函数
- MsAjax Lib-> Boolean 类型扩展
- MsAjax Lib-> Date 类型扩展
- MsAjax Lib-> Error 类型扩展
- MsAjax Lib-> Number 类型扩展
- js remove from array
- 架构师核心技能养成计划
- 讓我看看你的唇,猜猜你在說什麼
- 牙刷也能超音波振動
- 休闲游戏服务器
- 实现进程间数据交换的两种方法和应用
- MsAjax Lib-> Array.remove 函数
- MsAjax Lib-> Array.removeAt 函数
- MIME格式,按扩展名排序
- 从图灵奖看计算机科学技术发展史的缩影
- IIS中的MIME格式,按类型/子类型排序
- mpeg2
- 欢迎进群...5623253,编程思想...这里需要高手.
- 日文CGI中文化教學
- java访问数据库