js 常用写法笔记
2016-11-26 21:02
232 查看
数据结构
js 数组及字典
var dic = new Array(); //注意它的类型是Array dic["url"] = "images/gallery_128px_dark.png"; dic["reserved"] = ""; var dic2 = new Array(); //注意它的类型是Array dic2["url"] = "images/gallery_128px_yellow.png"; dic2["reserved"] = ""; var dic3 = new Array(); //注意它的类型是Array dic3["url"] = "images/gallery_128px_dark.png"; dic3["reserved"] = ""; $scope.dicList=[]; $scope.dicList.push(dic); $scope.dicList.push(dic2); $scope.dicList.push(dic3); console.log($scope.dicList);
数组初始化:
this.row=new Array("","","","") ;
二维数组初始化:
this.row=new Array("","","","") ;this.colume=[];
this.colume.push(this.row);
this.colume.push(this.row);
相关文章推荐
- 不安全的常用的js写法
- 【JS】底部版权常用写法
- JavaScript:js常用工具笔记
- node.js学习笔记之常用命令
- ember.js:使用笔记10 常用方法
- JS常用代码笔记
- js变量在属性里的写法 常用mark 多个DL遍历添加一个父级DIV
- 常用笔记: JS实现VBS当中的Replace
- cocos2d-js游戏设计常用函数笔记
- 数据库常用写法,笔记难的SQL写法
- 常用JS总结2-学习笔记
- 常用JS总结-学习笔记
- cocos2d-js游戏设计常用函数笔记(持续更新) (2014-08-18 15:43:12)
- 新职笔记,oracle与js常用方法
- 【JS】底部版权常用写法
- js中的event事件对象兼容型写法及事件流学习笔记
- 韩顺平 javascript教学视频_学习笔记23_js事件驱动机制深入理解_js常用事件_js版计算器
- jQuery学习笔记(一) 原生js写法
- cocos2d-js游戏设计常用函数笔记
- 关于Js、jq css html常用属性的笔记