Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 网站建设 > ASP.NET > MsAjax Lib-> Array.insert 函数
【标  题】:MsAjax Lib-> Array.insert 函数
【关键字】:MsAjax,Lib-,Array.insert
【来  源】:http://blog.csdn.net/chsword/archive/2007/02/25/1514199.aspx

MsAjax Lib-> Array.insert 函数

Your Ad Here

Array.insert 函数

在 Array 对象中的指定位置插入一个值. 静态函数,使用无需实例化。

语法

Array.insert(array, index, item);

参数

参数

说明

array

要将值 item 插入的数组.

index

插入位置的索引.

item

要插入的元素.

备注

使用 insert 函数在一个指定索处插入相应的元素. 插入位置之后的元素的索引值(index )依次增大1.

调用 insert 函数且输入的 index 为负值,则会从数组最后检查索引. 浮点值将四舍五入至整型.

下面的示例展示了如何使用 insert 函数来插入一个值.

JavaScript

var a = ['a', 'b', 'd', 'e'];
Array.insert(a, 2, 'c');
// 结果返回: "a,b,c,d,e"
document.write(a,"</p>");

 
MsAjax Lib-> Array.remove 函数:【上一篇】
MsAjax Lib-> Array.indexOf 函数:【下一篇】
【相关文章】
  • MsAjax Lib-> Array.remove 函数
  • MsAjax Lib-> Array.removeAt 函数
  • MsAjax Lib-> Boolean 类型扩展
  • MsAjax Lib-> Boolean.parse 函数
  • MsAjax Lib-> Date.format 函数
  • MsAjax Lib-> Date.localeFormat 函数
  • MsAjax Lib-> Date.parseLocale 函数
  • MsAjax Lib-> Date.parseInvariant 函数
  • MsAjax Lib-> Date 类型扩展
  • MSAJAX第二章:MSAJAX对字符串的扩展
  • 【随机文章】
  • ORACLE PLSQL使用经验总结_网上一位朋友所写
  • 学会QQ视频录像也轻松
  • Lua5.1.1的一个隐藏BUG
  • Visual WebGui 基于ajax的界面框架
  • 程序花花生(1)——熬了10年的一朵程序花
  • 明日潘多拉 试玩版详尽攻略
  • 对shutdown,halt,reboot,init的一点理解
  • 搞垮他的数据库--谈Oracle安全
  • Solaris与Windows的网络互联——Samba的应用
  • Dreamweaver层使用八定律
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.