摘要: 二维数组声明方式是下面这样的: var images=new Array(); //先声明一维 for(var i=0;i<10;i++){ //一维长度为10 images[i]=new Array(); //在声明二维 for(var j=0;j<20;j++){ //二维长度为20 images[i][j]=1; } } 2、二级数组使用方式应该是这样子的: alert(images[0][0]); 阅读全文
posted @ 2011-04-02 18:43 颜骨柳筋才大如海 阅读(780) 评论(0) 推荐(0) 编辑
摘要: JS数组声明技巧、数组动态添加元素 2008年11月11日 星期二 21:56数组的在任何语言中,都是一种很重要的数据结构,在JS中也不例外,今天发现了一个很好的技巧,一个是在JSON中声明数组的方法。数组可以这样声明:this.aNodes = []; // 其中this.aNodes为任意属性。如果数组已经填满数据,而又想继续添加元素同时改变数组的长度,则可以这样做:arraryObj[arraryObj.length]="";// arrayObj对数组对象,arraryObj.length为数组的当前长度 阅读全文
posted @ 2011-04-02 11:08 颜骨柳筋才大如海 阅读(4873) 评论(0) 推荐(0) 编辑
摘要: The context menu is just floating menu, so just grab the context menu event and show the menu. Since the button doesn't have the contextmenu you can grab directly the htmlelement (or the Element wrapper) and listen to the contextmenu eventexamplecontextMenu = new Ext.menu.Menu({ items: [{ text: 阅读全文
posted @ 2011-04-01 18:14 颜骨柳筋才大如海 阅读(272) 评论(0) 推荐(0) 编辑
摘要: JScript// JScript 文件Ext.namespace('Ext.test');Ext.test.Panel = function() { this.right = new Ext.Panel({ ddGroup: 'TreePanelDDGroup', border : true, id : 'right', title:'Panel', bodyStyle : 'padding: 5px', defaults : { bodyStyle : 'padding-left: 5px' } 阅读全文
posted @ 2011-03-26 13:58 颜骨柳筋才大如海 阅读(1593) 评论(0) 推荐(1) 编辑