JS 动态注册事件
摘要:JS当中动态注册事件,可以有好几种方式,但兼容性最好的是以下的方式://elementid:要注册事件的HTML控件的ID//type:注册事件的名称,(例如:blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error)//
阅读全文
posted @
2012-03-28 15:48
lock
阅读(672)
推荐(0)
android- LayoutInflater
摘要:第一步:得到当前Activity的LayoutInflater object. //下面俩种方法都可以 //LayoutInflaterinflater=getLayoutInflater();LayoutInflaterinflater=(LayoutInflater)this.getSystemService(LAYOUT_INFLATER_SERVICE);第二步:通过inflate方法得到ViewViewlayout=inflater.inflate(R.layout.custom_dialog,null);// R.layout.custom_dialog -> View的资源
阅读全文