禁用按钮时jQuery的第一次点击 [英] disable button when first click in jquery

查看:105
本文介绍了禁用按钮时jQuery的第一次点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想禁用按钮时,用户首先点击它,所以它不能保存多个记录,如果用户有一个缓慢的连接。即时通讯使用asp.net MVC2


解决方案

  $('#buttonId')。点击(函数(){
    $(本).attr('残疾','禁用');
});

当然,你必须调整选择。

I want to disable button when user first click it so it must not save multiple record if a user have a slow connection. Im using asp.net mvc2

解决方案

$('#buttonId').click(function() {
    $(this).attr('disabled', 'disabled');
});

Of course you have to adjust the selector.

这篇关于禁用按钮时jQuery的第一次点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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