且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

防止使用jQuery单击第二个按钮

更新时间:2023-12-03 09:15:10

您可以为此在jquery中使用一个 >

you can use one in jquery for that

$("#myButton").one("click",function(){

它将为该元素的事件附加一个处理程序,该事件最多执行一次.

It will attach a handler to an event for the element which will executed at most one.