想要在所有requirefield验证器为false后禁用按钮 [英] Want to disable button after all requirefield validator are false

查看:103
本文介绍了想要在所有requirefield验证器为false后禁用按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Helloo,

我想在所有我的requirefield验证器都为false之后禁用按钮.我在消息的按钮OnclientClick事件上使用了javascript函数.

现在,当用户第一次单击时,然后在该按钮上第二次禁用后,用户将不再执行进一步的操作.


因此,如何使用Java脚本禁用按钮.
我使用以下javascript,但无法使按钮禁用.

Helloo,

I want to make disable the button after all my requirefield validator are false. I use the javascript function on that button OnclientClick event for the message.

now, when user click first time then after that button disable for the second time click and no further action will be done by the user.


So, how can I disable the button using the Javascript.
i use the below javascript but not work to make the button disable.

function validate()
    {
        if(Page_ClientValidate())
        {        
            if(!confirm(''Are you Sure to submit your order to us?''))
            {              
                document.getElementById("btn_submit").enabled=false;
                return false;
                
            }
        }
   }




提前谢谢...
MItesh




Thanks in advance...
MItesh

推荐答案

尝试一下.
function validate()
    {
        if(Page_ClientValidate())
        {
            if(!confirm('Are you Sure to submit your order to us?'))
            {
//                form1.Button1.disabled = true;  
                //document.getElementById("btn_submit").enabled=false;
                return false;
            }
         form1.Button1.disabled = true;  
        }
   }


这篇关于想要在所有requirefield验证器为false后禁用按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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