Javascript 我在ExtJS表单中遇到了一个问题:当选择单选按钮时,焦点事件不会在所有浏览器中执行
我在ExtJS表单中遇到了一个问题。在我的表单上选择单选按钮时,焦点事件不会在所有浏览器中执行。 在Firefox(Mac)上,一切都可以正常工作,但在Google Chrome(Mac)上,一切都无法正常工作。 我没有在PC上测试我的ExtJS,只在Mac上测试。 有时在Firefox中,并非所有浏览器加载都能正常工作 下面是一些关于函数的源代码,这些函数并不总是很好地工作:Javascript 我在ExtJS表单中遇到了一个问题:当选择单选按钮时,焦点事件不会在所有浏览器中执行,javascript,extjs,Javascript,Extjs,我在ExtJS表单中遇到了一个问题。在我的表单上选择单选按钮时,焦点事件不会在所有浏览器中执行。 在Firefox(Mac)上,一切都可以正常工作,但在Google Chrome(Mac)上,一切都无法正常工作。 我没有在PC上测试我的ExtJS,只在Mac上测试。 有时在Firefox中,并非所有浏览器加载都能正常工作 下面是一些关于函数的源代码,这些函数并不总是很好地工作: Radio1.on('focus', function(){ //alert('test1'
Radio1.on('focus', function(){
//alert('test1');
Ext.getCmp('combo1').enable();
Ext.getCmp('combo2').disable();
Ext.getCmp('option3').disable();
Ext.getCmp('option4').disable();
Ext.getCmp('option5').disable();
Ext.getCmp('option6').disable();
Ext.getCmp('option7').disable();
Ext.getCmp('option8').disable();
Ext.getCmp('option9').disable();
Ext.getCmp('option10').disable();
});
Radio2.on('focus', function(){
//alert('test2');
Ext.getCmp('combo1').disable();
Ext.getCmp('combo2').enable();
Ext.getCmp('option3').enable();
Ext.getCmp('option4').enable();
Ext.getCmp('option5').enable();
Ext.getCmp('option6').enable();
Ext.getCmp('option7').enable();
Ext.getCmp('option8').enable();
Ext.getCmp('option9').enable();
Ext.getCmp('option10').enable();
});
如何修复代码?有什么想法吗?你确定要在焦点上这样做吗?你想达到什么目标?你不想在选中单选按钮时检测到它吗?不,我只想做一个功能,当我在两个单选按钮之间进行选择时,禁用/启用表单项。它不需要聚焦。