Fire Fox中未触发OnClick事件 [英] OnClick Event is not triggered in Fire Fox

查看:84
本文介绍了Fire Fox中未触发OnClick事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码在IE中有效,但在FireFox中不起作用,
我在网络表单中使用了以下代码,如何解决此问题.

The following code is Working in IE but it is not working in FireFox,
I m used the following code in my web form, how I resolved this one.

imgbtnLogin.Attributes.Add("onClick", "return myfunction();");



谢谢&问候
Honey



Thanks & Regards
Honey

推荐答案

imgbtnLogin.Attributes.Add("onClick","return myfunction();");
很难说,因为您还没有共享该功能的全部功能.

尝试:调用JS函数时,添加按钮的this属性.用它.
例如:
imgbtnLogin.Attributes.Add("onClick", "return myfunction();");
Hard to tell as you have not shared what all does the function does.

Try: Add the this attribute of the button while calling JS function. Use it.
Ex:
imgbtnLogin.Attributes.Add("onClick", "return myfunction(this);");



此外,不确定是否完全类似的情况,也请查看以下内容:修复了Firefox click( )事件问题 [^ ]



Further, not sure if exactly similar scenario, do have a look at this too: Fix for Firefox click() event issue[^]


这篇关于Fire Fox中未触发OnClick事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆