获取RadioGroup Extjs4中最后选择的选项(Get the last selected option in RadioGroup Extjs4)

编程入门 行业动态 更新时间:2024-10-28 02:32:22
获取RadioGroup Extjs4中最后选择的选项(Get the last selected option in RadioGroup Extjs4)

有没有办法获得广播组中最后选择的选项?

IS there any way to get the last selected option in the radio group?

最满意答案

您可以在更改时手动添加侦听器:

radGrp = {xtype: 'radiogroup', ... previousVal:undefined, listeners:[ change: function( this, newValue, oldValue, eOpts ) {this.previousVal = oldValue;} ]}

在此之后,您可以访问此属性

var getRadPrevious= function(){ return radGrp.previousVal; }

You can manually add listener on change:

radGrp = {xtype: 'radiogroup', ... previousVal:undefined, listeners:[ change: function( this, newValue, oldValue, eOpts ) {this.previousVal = oldValue;} ]}

After this you can access to this attribute

var getRadPrevious= function(){ return radGrp.previousVal; }

更多推荐

本文发布于:2023-07-23 04:37:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1227557.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:选项   RadioGroup   selected   option

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!