我在Ext多选择器创建后根据另一个值动态加载数据。我发现为多选择器生成Ext存储的唯一方法是使用generate a click event。
但事实证明,click事件不会触发搜索框在IE11中打开,从而使存储处于未实例化状态。Full Fiddle感谢N. Jadhav,由于某些原因,我无法在Sencha获得mods来确认我的个人资料。令人不快的事件,它可以正常启动,不会抛出错误,但单击不会打开搜索组件。
afterrender: function (form) {
var plus = form.down('multiselector').tools[0];
//Fire click event of plus button for creating search view
//THIS DOESN'T WORK IN IE 11
plus.el.dom.click();
//Hide the multiselector-search
form.down('multiselector-search').hide();
}
在Internet Explorer11中有没有其他触发点击的方法?
我尝试了下面的方法,但没有成功。
var event = document.createEvent("MouseEvent");
event.initMouseEvent("click",true,true,window,0,0,0,0,0,false,false,false,false,0,null);
plus.dispatchEvent(event)
发布于 2018-04-14 11:51:48
您可以使用带有‘onclick=function_call()’的div,例如:
<div class=“button” onclick=“funcThatWillTriggerWhatIWant( a, b, some_object); otherOptionalFunction(var1, var2);” > stuff in here </div>
<script type=“text/javascript”>
function funcThatWIllTriggerWhatIWant( a, b, obj){
...
}
</script>
https://stackoverflow.com/questions/49760100
复制相似问题