Extjs获取input值的几种方法

记录一下:

ExtJs获取文本框中值的几种方式

EXTHTML
1、Html文本框

如:
获取值的方式为:
var tValue = Ext.getDom('test').value;
或者
var tValue = document.getElementById('test').value
2、ExtJs的组件
如:{
id:'test',
xtype:'textfield',
fieldLabel:'  测试',
name:'test',
width:370
}
获取值的方式为:
var tValue = Ext.getCmp('test').getValue()

posted @ 2017-12-20 14:57  一轮明月随潮涌  阅读(2383)  评论(0编辑  收藏  举报