gpt4 book ai didi

javascript - 在 Ext.button.Split 按钮中显示所选值

转载 作者:行者123 更新时间:2023-12-03 01:37:10 25 4
gpt4 key购买 nike

从这个例子来看,即,

 Ext.create('Ext.button.Split', {
renderTo: Ext.getBody(),
text: 'Options',
// handle a click on the button itself
handler: function() {
alert("The button was clicked");
},
menu: new Ext.menu.Menu({
items: [
// these will render as dropdown menu items when the arrow is clicked:
{text: 'Item 1', handler: function(){ alert("Item 1 clicked"); }},
{text: 'Item 2', handler: function(){ alert("Item 2 clicked"); }}
]
})
});

如何动态显示按钮中的选择?谢谢!

最佳答案

您必须到达祖 parent 并设置文本,这是 fiddle :FIDDLE

关于javascript - 在 Ext.button.Split 按钮中显示所选值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51015516/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com