本文介绍了单击时禁用按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有多人应用按钮的形式,每个按钮都有uniq id
< button class =btntype =按钮id =@ item.JobId'_Apply'name =actiononclick =Apply(@ item.JobId,'@ item.DesignationName')>申请
< / button>
按钮点击我想禁用特定按钮
但现在不行了
我尝试了什么:
$(#+ id +_ Apply)。attr(disabled,true);
$(this).attr(disabled,true);
解决方案
i have form where multiople apply button and have uniq id for every button
<button class="btn " type="button" id="@item.JobId'_Apply'" name="action" onclick="Apply(@item.JobId,'@item.DesignationName')"> Apply </button>
button click i want to disable perticular button
but it's not work now
What I have tried:
$("#" + id + "_Apply").attr("disabled", true); $(this).attr("disabled", true);
解决方案
这篇关于单击时禁用按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!