Extjs4中Ext下的一些常用方法
2013-11-27 15:09
204 查看
var onl = function(){ //alert("2 我是呗body的onload事件调用的") } Ext.onReady(function(){ //1.onReady 这个个方法里面的第一个参数(funcion)他执行在页面文件按加载完毕之后和onload完成之后. //alert("3 extjs") //2.通过类似XML的选测方式来查询我们的节点 var arr = Ext.query("TR TD"); //alert(arr) //3.getCmp获取组件 Ext.create("Ext.panel.Panel",{ width:400, height:300, html:'<p>hello word</p>', id:'myp01', title:'my panel', renderTo:"myp" }); var myp = Ext.getCmp("myp01"); myp.setTitle("new title"); //4.isEmpty // alert(Ext.isEmpty({})); // alert(Ext.isEmpty('',true));//flase // alert(Ext.isEmpty('',false));//true //5.namespace Ext.namespace("COM.PCAT.MODE","COM.PCAT.CORE"); COM.PCAT.MODE.A = { name:'uspcat' }; COM.PCAT.CORE.A = function(){ alert("COM.PCAT.CORE.A"); }; //6.each var array = [-1,23,43543,4,6,7,8]; Ext.each(array,function(i){ //alert(i) }) //7.apply var a = { name:'yfc' } Ext.apply(a,{getName:function(){ alert(this.name); }}); //a.getName(); //8.encode( Mixed o ) : String //alert(Ext.encode(a)); //9.htmlDecode //Ext.Msg.alert("hello",Ext.htmlDecode("<h1>hel>lo</h1>")); //10.select //var o1 = Ext.select("divC"); //alert(o1) //11.typeOf( Mixed value ) : String alert(Ext.typeOf({}));//object alert(Ext.typeOf(""));//string alert(Ext.typeOf(function(){}));//function })
相关文章推荐
- Ext 的一些常用方法
- 【原】基础篇:第三篇,常用的一些Ext方法
- Ext.form.ComboBox最常用的一些属性和方法
- Ext.form.ComboBox最常用的一些属性和方法
- hibernateDaoSupport中的一些公用常用方法
- 安卓开发中常用的一些方法记录下
- 游戏音乐MediaPlayer和SoundPool常用的一些方法
- ExtJs4常用配置方法备忘
- GameObject类一些常用的方法属性
- 可以把一些常用的方法,写入js文件,引入html界面
- Mechanize模拟自然网页交互一些基本常用方法
- Android 常用的一些系统级的类、方法
- CString的一些常用方法
- Asp.NET中常用的一些优化性能的方法
- EXT中常用方法
- UIView常用的一些方法小记之setNeedsDisplay和setNeedsLayout
- C#常用的一些日期处理方法
- 数组中的一些常用方法总结
- UIView的一些常用属性和方法
- Asp.NET中常用的一些优化性能的方法