87,989
社区成员
发帖
与我相关
我的任务
分享
Ext.onReady(function(){
var SendCmd = new Ext.FormPanel({
aotoHeight:true,
buttonAlign:'center',
border:false,
bodyStyle:'padding: 10px 10px 10px 20px;',
labelWidth:2,
defaults:{
anchor:'95%',
allowBlank:false,
msgTarget:'side'
},
items:[{
xtype:'textarea',
id:'Result',
name:'Result',
height:200,
readOnly:true,
allowBlank:true
}, {
xtype:'textfield',
emptyText : '请输入...',
name:"Task",
id:"Task",
listeners:{'specialkey':function(_field,_e){
if (_e.getKey() == _e.ENTER){
var str = Ext.getCmp('Result').getValue()+'\r\n'+Ext.getCmp('Task').getValue();
Ext.getCmp('Result').setValue(str);
document.all.Result.scrollTop=document.all.Result.scrollHeight;
}
}}
}]
});
var win=new Ext.Window({
layout:'fit',
title:"test",
width:620,
height:350,
constrain: true,
resizable:false,
collapsible:true,
closable:true,
items:SendCmd
});
win.show();
});