EXT Form的循环动态增加或者删除


itemForm.items.each(function(C){
	if(C != Ext.getCmp("addOption")){
		itemForm.remove(C,true);
	}
    }
)
itemForm.doLayout(); //必须要重新布局才能看到效果
//循环itemForm删除它里面的元素



var panel = Ext.getCmp("itemOption");
			var _textfield = new Ext.form.TextField({
				width:150
			});
			panel.add(_textfield);
			itemForm.doLayout();

你可能感兴趣的:(C++,c,C#,ext,Ruby)