button

方法:加上属性disabled = “disabled” 或者 disabled = “true”



<button id="btn" disabled="disabled">确定</button>
2>Javascript里
<script>
$("#btn").attr("disabled","true");
$("#btn").attr("disabled","disabled");
$("#btn").attr("disabled","false");
$("#btn").removeAttr("disabled","disabled");
</script>


a标签

方法:在点击一次后,解除绑定。



<a id="mybtn">button</a>
<script>
$("a").click(function(){
alert("1");
$(this).css("color","#CCC");
$(this).unbind("click");
})
</script>


或者:



a标签 点击一次后设置点击失效,防止重复提交;

$("a").one("click",function(){

$(this).click(function (){return false;});
});