Extjs无线电addevent问题

发布于 2024-07-29 11:39:36 字数 1081 浏览 2 评论 0原文

我在点击事件上添加单选按钮。 但不工作。 我的代码:

RadioPanel:

   RadioPanels = new Ext.Panel({
                    layout: 'table',
                    id: 'newRadioEdit',
                    name: 'newRadioEdit',
                    //title:'Servis Durumu',
                    bodyStyle: Ext.isIE ? 'padding-left:35px;' : 'padding-left:35px;',
                    layoutConfig: {
                        columns: 2
                    },
                    anchor: '100%',
                    defaults: {
                        border: false,
                        layout: 'form',

                        labelWidth: 15,
                        style: {
                            paddingRight: '10px'
                        }
                    }
                });
var radio= new Ext.form.Radio({
        name: 'SERVIS_DURUMU',
        inputValue: '1',
        boxLabel: 'Test',
        style: {
            marginRight: '10px'
        }
    });
    radio.addListener('click',function() {
        alert("yihuuu");
    });
RadioPanels.add(radio);

i'am add radio buttons on click event. but not working. my code :

RadioPanel :

   RadioPanels = new Ext.Panel({
                    layout: 'table',
                    id: 'newRadioEdit',
                    name: 'newRadioEdit',
                    //title:'Servis Durumu',
                    bodyStyle: Ext.isIE ? 'padding-left:35px;' : 'padding-left:35px;',
                    layoutConfig: {
                        columns: 2
                    },
                    anchor: '100%',
                    defaults: {
                        border: false,
                        layout: 'form',

                        labelWidth: 15,
                        style: {
                            paddingRight: '10px'
                        }
                    }
                });
var radio= new Ext.form.Radio({
        name: 'SERVIS_DURUMU',
        inputValue: '1',
        boxLabel: 'Test',
        style: {
            marginRight: '10px'
        }
    });
    radio.addListener('click',function() {
        alert("yihuuu");
    });
RadioPanels.add(radio);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

德意的啸 2024-08-05 11:39:36

该事件是检查而不是点击

radio.addListener('check',function() {
    alert("yihuuu");
});

the event is check not click.

radio.addListener('check',function() {
    alert("yihuuu");
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文