JScript code
<script type="text/javascript">
var user1 = new Ext.form.TextField({ })
var user2= new Ext.form.TextField({ })
var c_window = new Ext.Window({
title: 'title',
width: 950,
height: 530,
plain: true,
closeAction: 'hide',
defaults: { anchor: '95%' },
items:[user1],
modal: true,
buttons: [{ text: '关闭', handler: function(){ c_window.hide(); } },
{ text: '添加',
handler: function(){
c_window.add(user2); // 添加新组件
c_window.render(); // 添加后需要重新渲染一遍。 } }] });
c_window.show();
</script>