onclientclick在firefox中无法正常工作? [英] onclientclick in firefox not working?

查看:89
本文介绍了onclientclick在firefox中无法正常工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




$ p $ ba按钮在aspx页面内如下,



Hi,

a button inside aspx page as below,

<asp:ImageButton ID="removeButton" runat="server"  OnClick="removeStudentInformation" OnClientClick="return checkBoxselectedornot()" ImageUrl="~/image/remove-selected-button.png" />







但它的onclientclick在firefox.how中无法解决?



javascript如下






But it''s onclientclick doesn''t work in firefox.how to solve?

javascript as below

function checkBoxselectedornot() {

       
        var valid = false;
        var gridview = document.getElementById("studentInformationGrid");

        for (var i = 0; i < gridview.all.length; i++) {
            var node = gridview.all[i];
            if (node != null && node.type == "checkbox" && node.checked) {
                valid = true;
                break;
            }
        }
        if (!valid) {
            alert("Invalid. Please select a student to continue.");
        }

        return valid;


}





谢谢..



Thanks..

推荐答案

请阅读。

http://stackoverflow.com/questions/5065197/onclientclick-and-click-event-together-for-a-button-is-not-firing-issue-in-fir



我希望它对你有用。
please read it.
http://stackoverflow.com/questions/5065197/onclientclick-and-click-event-together-for-a-button-is-not-firing-issue-in-fir

I hope it will be useful for you.


http://thomas.net.nz/post/2009/03/25/FireFox -cannot-handle-OnClientClick-and-OnClick-event-at-the-time-time.aspx [ ^ ]


这篇关于onclientclick在firefox中无法正常工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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