1. 首页
  2. 移动开发
  3. MeeGo
  4. js 声明数组和向数组中添加对象变量的简单实例

js 声明数组和向数组中添加对象变量的简单实例

上传者: 2020-12-13 08:13:18上传 PDF文件 27.68KB 热度 20次
数组有四种定义的方式 使用构造函数: var a = new Array(); var b = new Array(10); var c = new Array(“first”, “second”, “third”); 或者数组直接量: var d = [“first”, “second”, “third”]; 扩展: function ObjStory(id,biaoti,author,type) //声明对象 { this.ID = id; this.Biaoti= biaoti; this.Author= author; this.Type =
下载地址
用户评论